package com.subsidy.util; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldStrategy; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableLogic; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.time.LocalDateTime; @Data public abstract class BaseModel { /** * 创建时间 */ @JsonIgnore @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_date", fill = FieldFill.INSERT) private LocalDateTime createDate; /** * 更新时间 */ @JsonIgnore @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "update_date", fill = FieldFill.UPDATE) private LocalDateTime updateDate; /** * 删除时间 */ @JsonIgnore @TableLogic private LocalDateTime deleteDate; }