package com.hx.other.service.model; import com.fasterxml.jackson.annotation.JsonFormat; import com.gitee.sunchenbin.mybatis.actable.annotation.Column; import com.gitee.sunchenbin.mybatis.actable.annotation.Index; import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; /** * 基础实体类 * @Author: cmg * @Data: 2023-04-19 */ @Data public class BaseEntity implements Serializable { @Column(type = MySqlTypeConstant.VARCHAR, length = 64, isKey=true, comment="标识", isNull=false) private String id; @Column(comment="是否删除", isNull = false, length = 2, type = MySqlTypeConstant.INT) private Integer isDel = NO; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @Column(comment="创建时间",type = MySqlTypeConstant.DATETIME, isNull = false) private Date createTime = new Date(); @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @Column(comment="更新时间",type = MySqlTypeConstant.DATETIME) private Date editTime = new Date(); /////////////////////////////////////////////////////// /**数字0*/ public static final Integer NO = 0; /**数字1*/ public static final Integer YES = 1; }