BaseModel.java
964 Bytes
package com.zhongzhi.model.base;
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 class BaseModel {
/**
* 创建时间
*/
@JsonIgnore
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@JsonIgnore
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "update_time", fill = FieldFill.UPDATE)
private LocalDateTime updateTime;
/**
* 删除时间
*/
@JsonIgnore
@TableLogic
private LocalDateTime deleteTime;
}