package com.ruoyi.doubledefense.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.constant.DeletedEnum;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.utils.SecurityUtils;
import lombok.Data;

import java.util.Date;

/**
 * 四色图对象 tb_four_color_diagram
 *
 * @author lyp
 * @date 2023-09-16
 */
@Data
public class FourColorDiagram extends BaseEntity {

    private static final long serialVersionUID = -7685935797039789001L;
    /**
     * uuid主键
     */
    private String id;

    /**
     * 编号
     */
    @Excel(name = "编号")
    private String colorCode;

    /**
     * 名称
     */
    @Excel(name = "名称")
    private String colorName;

    /**
     * 四色图
     */
    @Excel(name = "四色图")
    private String colorImg;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarkInfo;

    /**
     * 企业编码
     */
    private String companyCode;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 创建人ID
     */
    private Long createUserId;

    /**
     * 更新时间
     */
    private Date updateDate;

    /**
     * 更新人
     */
    private Long updateUserId;

    /**
     * 删除标识：0正常，1已删除
     */
    private Integer isDel;



    public void setCreateDefault(){
        this.setCreateUserId(SecurityUtils.getUserId());
        this.setCreateDate(new Date());
        this.setUpdateUserId(SecurityUtils.getUserId());
        this.setUpdateDate(new Date());
        this.setIsDel(DeletedEnum.VALID.getValue());
        this.setCompanyCode(SecurityUtils.getUserCompanyCode());

    }

    public void setUpdateDefault(){
        this.setUpdateUserId(SecurityUtils.getUserId());
        this.setUpdateDate(new Date());
    }

}
