package cn.reghao.tnb.sb.db.mybatis.test;

import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseObject<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    protected T id;
    // 逻辑删除
    private Boolean deleted;
    protected LocalDateTime createTime;
    protected LocalDateTime updateTime;

    public BaseObject() {
        this.deleted = false;
        LocalDateTime now = LocalDateTime.now();
        this.createTime = now;
        this.updateTime = now;
    }
}
