im.shs.tick.mybatis.model.BaseModel Maven / Gradle / Ivy
The newest version!
package im.shs.tick.mybatis.model;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = true)
public abstract class BaseModel> extends Model {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
protected Integer id;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
protected LocalDateTime createTime;
/**
* 创建人ID
*/
@TableField(fill = FieldFill.INSERT)
protected Integer createBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.UPDATE)
protected LocalDateTime updateTime;
/**
* 修改人ID
*/
@TableField(fill = FieldFill.UPDATE)
protected Integer updateBy;
/**
* 是否删除 true:已删除 false:正常
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
protected Boolean deleted;
/**
* 版本号
*/
@Version
@TableField(fill = FieldFill.INSERT)
protected Integer version;
}