package cn.reghao.autodop.dmaster.util.db;

import lombok.Data;
import org.springframework.data.annotation.Id;

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

/**
 * @author reghao
 * @date 2019-10-18 14:42:48
 */
@Data
public class BaseDocument implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    private String id;
    // 逻辑删除
    private Boolean isDelete;

    protected LocalDateTime createTime;
    protected LocalDateTime updateTime;

    public BaseDocument() {
        this.isDelete = false;
        this.createTime = LocalDateTime.now();
        this.updateTime = LocalDateTime.now();
    }
}
