package cn.axzo.msg.center.domain.persistence;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * @author cold_blade
 * @date 2023/10/24
 * @version 1.0
 */
@Setter
@Getter
public abstract class BaseEntityExt<T extends Model<T>> extends Model<T> implements Serializable {

    private static final long serialVersionUID = -420591992046546211L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    protected Long id;

    /**
     * 创建时间
     */
    protected Date createAt;

    /**
     * 修改时间
     */
    protected Date updateAt;

    /**
     * 是否删除 0正常，1删除
     */
    @TableLogic(delval = "id", value = "0")
    protected Long isDelete = 0L;
}
