top.doudou.common.tool.base.BaseEntity Maven / Gradle / Ivy
package top.doudou.common.tool.base;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author 傻男人<[email protected]>
* @Date: 2020/6/16 15:33
* @Version: 1.0
* @Description:
*/
@Data
public class BaseEntity implements Serializable {
private static final long serialVersionUID = -9878765144179L;
/**
* 创建时间
*/
@TableField(value = "create_date",fill = FieldFill.INSERT)
private Date createDate;
/**
* 最后一次更新时间
*/
@TableField(value = "update_date",fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 自动编号
*/
@TableId(value="id", type= IdType.AUTO)
private Long id;
}