cjl
2023-11-30 fc7bf1fdc7153859644d639ffe094d75b04cb9c7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.moral.api.pojo.bean;
 
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
 
import java.io.Serializable;
import java.util.Date;
 
/**
 * @ClassName BaseUpdateEntity
 * @Description TODO
 * @Author @cjl
 * @Date 2023-09-25 10:57
 * @Version 1.0
 */
@Getter
@SuppressWarnings("unchecked")
public abstract class BaseUpdateEntity <T extends Serializable> extends BaseCreateEntity<T>{
    /**
     * 更新人ID
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Integer updateId;
 
    /**
     * 更新人姓名
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;
 
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;
 
    public T setUpdateId(Integer updateId) {
        this.updateId = updateId;
        return (T) this;
    }
 
    public T setUpdateName(String updateName) {
        this.updateName = updateName;
        return (T) this;
    }
 
    public T setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return (T) this;
    }
}