package com.niuan.erp.common.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.Getter; import lombok.Setter; import java.time.LocalDateTime; /** * 基础 Entity *
* 需要注意如果是老数据库迁移过来的表结构使用的是大写驼峰法命名,使用的基础类为 {@link com.niuan.erp.common.base.OldBaseEntity} */ @Getter @Setter public class BaseEntity { @TableId(value = "id", type = IdType.AUTO) private Long id; @TableField(value = "status", fill = FieldFill.INSERT) private Integer status; @TableField(value = "create_user_id", fill = FieldFill.INSERT) private Long createUserId; @TableField(value = "create_user_name", fill = FieldFill.INSERT) private String createUserName; @TableField(value = "create_date", fill = FieldFill.INSERT) private LocalDateTime createDate; @TableField(value = "update_user_id", fill = FieldFill.UPDATE) private Long updateUserId; @TableField(value = "update_user_name", fill = FieldFill.UPDATE) private String updateUserName; @TableField(value = "update_date", fill = FieldFill.UPDATE) private LocalDateTime updateDate; }