package com.camp;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @Author Arbor
* @Description TODO
*/
@Data
public class BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private String id;
/**
* 数据创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime dateCreated;
/**
* 数据修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime dateUpdated;
/**
* 数据逻辑状态
*/
@TableLogic(value = "1", delval = "0")
private Integer valid;
/**
* 数据修改版本
*/
@Version
@TableField(fill = FieldFill.INSERT)
private Integer version;
}
标签:INSERT,TableField,实体类,private,plus,FieldFill,mybatis,import,fill
From: https://www.cnblogs.com/Arborblog/p/17958683