package cn.ibizlab.humanresource.core.humanresource.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.humanresource.util.domain.EntityBase;
import cn.ibizlab.humanresource.util.annotation.DEField;
import cn.ibizlab.humanresource.util.enums.DEPredefinedFieldType;
import cn.ibizlab.humanresource.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.humanresource.util.annotation.Audit;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.humanresource.util.domain.EntityMP;

/**
 * 实体[证书信息]
 */
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "T_HRCERTIFICATE",resultMap = "HRCertificateResultMap")
public class HRCertificate extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 证书信息标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrcertificateid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrcertificateid")
    @JsonProperty("hrcertificateid")
    private String hrcertificateid;
    /**
     * 证书名称
     */
    @TableField(value = "hrcertificatename")
    @JSONField(name = "hrcertificatename")
    @JsonProperty("hrcertificatename")
    private String hrcertificatename;
    /**
     * 建立时间
     */
    @DEField(preType = DEPredefinedFieldType.CREATEDATE)
    @TableField(value = "createdate" , fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("createdate")
    private Timestamp createdate;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 建立人
     */
    @DEField(preType = DEPredefinedFieldType.CREATEMAN)
    @TableField(value = "createman" , fill = FieldFill.INSERT)
    @JSONField(name = "createman")
    @JsonProperty("createman")
    private String createman;
    /**
     * 更新时间
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
    @TableField(value = "updatedate")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("updatedate")
    private Timestamp updatedate;
    /**
     * 员工标识
     */
    @TableField(value = "hremployeeid")
    @JSONField(name = "hremployeeid")
    @JsonProperty("hremployeeid")
    private String hremployeeid;
    /**
     * 员工姓名
     */
    @TableField(exist = false)
    @JSONField(name = "hremployeename")
    @JsonProperty("hremployeename")
    private String hremployeename;
    /**
     * 附件
     */
    @TableField(value = "attachment")
    @JSONField(name = "attachment")
    @JsonProperty("attachment")
    private String attachment;
    /**
     * 证书编号
     */
    @TableField(value = "certificatecode")
    @JSONField(name = "certificatecode")
    @JsonProperty("certificatecode")
    private String certificatecode;
    /**
     * 签发机构
     */
    @TableField(value = "authorganization")
    @JSONField(name = "authorganization")
    @JsonProperty("authorganization")
    private String authorganization;
    /**
     * 签发日期
     */
    @TableField(value = "authdate")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "authdate" , format="yyyy-MM-dd")
    @JsonProperty("authdate")
    private Timestamp authdate;
    /**
     * 失效日期
     */
    @TableField(value = "expiredate")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "expiredate" , format="yyyy-MM-dd")
    @JsonProperty("expiredate")
    private Timestamp expiredate;
    /**
     * 注册编号
     */
    @TableField(value = "registercode")
    @JSONField(name = "registercode")
    @JsonProperty("registercode")
    private String registercode;
    /**
     * 初始注册时间
     */
    @TableField(value = "registertime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "registertime" , format="yyyy-MM-dd")
    @JsonProperty("registertime")
    private Timestamp registertime;
    /**
     * 备注
     */
    @TableField(value = "memo")
    @JSONField(name = "memo")
    @JsonProperty("memo")
    private String memo;
    /**
     * 注册单位ID
     */
    @TableField(value = "registerorganizationid")
    @JSONField(name = "registerorganizationid")
    @JsonProperty("registerorganizationid")
    private String registerorganizationid;
    /**
     * 注册单位
     */
    @TableField(exist = false)
    @JSONField(name = "registerorganizationname")
    @JsonProperty("registerorganizationname")
    private String registerorganizationname;
    /**
     * 员工编号
     */
    @TableField(exist = false)
    @JSONField(name = "employeecode")
    @JsonProperty("employeecode")
    private String employeecode;
    /**
     * 单位
     */
    @TableField(exist = false)
    @JSONField(name = "organizationname")
    @JsonProperty("organizationname")
    private String organizationname;
    /**
     * 单位ID
     */
    @TableField(exist = false)
    @JSONField(name = "organizationid")
    @JsonProperty("organizationid")
    private String organizationid;
    /**
     * 员工状态
     */
    @TableField(exist = false)
    @JSONField(name = "empstate")
    @JsonProperty("empstate")
    private String empstate;
    /**
     * 是否有效
     */
    @DEField(defaultValue = "1")
    @TableField(value = "activeflag")
    @JSONField(name = "activeflag")
    @JsonProperty("activeflag")
    private Integer activeflag;

    /**
     * 员工
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.humanresource.domain.HREmployee hremployee;

    /**
     * 注册单位
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.base.domain.HROrganization registerorganization;



    /**
     * 设置 [证书名称]
     */
    public void setHrcertificatename(String hrcertificatename){
        this.hrcertificatename = hrcertificatename ;
        this.modify("hrcertificatename",hrcertificatename);
    }

    /**
     * 设置 [员工标识]
     */
    public void setHremployeeid(String hremployeeid){
        this.hremployeeid = hremployeeid ;
        this.modify("hremployeeid",hremployeeid);
    }

    /**
     * 设置 [附件]
     */
    public void setAttachment(String attachment){
        this.attachment = attachment ;
        this.modify("attachment",attachment);
    }

    /**
     * 设置 [证书编号]
     */
    public void setCertificatecode(String certificatecode){
        this.certificatecode = certificatecode ;
        this.modify("certificatecode",certificatecode);
    }

    /**
     * 设置 [签发机构]
     */
    public void setAuthorganization(String authorganization){
        this.authorganization = authorganization ;
        this.modify("authorganization",authorganization);
    }

    /**
     * 设置 [签发日期]
     */
    public void setAuthdate(Timestamp authdate){
        this.authdate = authdate ;
        this.modify("authdate",authdate);
    }

    /**
     * 格式化日期 [签发日期]
     */
    public String formatAuthdate(){
        if (this.authdate == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(authdate);
    }
    /**
     * 设置 [失效日期]
     */
    public void setExpiredate(Timestamp expiredate){
        this.expiredate = expiredate ;
        this.modify("expiredate",expiredate);
    }

    /**
     * 格式化日期 [失效日期]
     */
    public String formatExpiredate(){
        if (this.expiredate == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(expiredate);
    }
    /**
     * 设置 [注册编号]
     */
    public void setRegistercode(String registercode){
        this.registercode = registercode ;
        this.modify("registercode",registercode);
    }

    /**
     * 设置 [初始注册时间]
     */
    public void setRegistertime(Timestamp registertime){
        this.registertime = registertime ;
        this.modify("registertime",registertime);
    }

    /**
     * 格式化日期 [初始注册时间]
     */
    public String formatRegistertime(){
        if (this.registertime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(registertime);
    }
    /**
     * 设置 [备注]
     */
    public void setMemo(String memo){
        this.memo = memo ;
        this.modify("memo",memo);
    }

    /**
     * 设置 [注册单位ID]
     */
    public void setRegisterorganizationid(String registerorganizationid){
        this.registerorganizationid = registerorganizationid ;
        this.modify("registerorganizationid",registerorganizationid);
    }

    /**
     * 设置 [是否有效]
     */
    public void setActiveflag(Integer activeflag){
        this.activeflag = activeflag ;
        this.modify("activeflag",activeflag);
    }


}


