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_HRPATENT",resultMap = "HRPatentResultMap")
public class HRPatent extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 专利信息标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrpatentid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrpatentid")
    @JsonProperty("hrpatentid")
    private String hrpatentid;
    /**
     * 建立人
     */
    @DEField(preType = DEPredefinedFieldType.CREATEMAN)
    @TableField(value = "createman" , fill = FieldFill.INSERT)
    @JSONField(name = "createman")
    @JsonProperty("createman")
    private String createman;
    /**
     * 专利名称
     */
    @TableField(value = "hrpatentname")
    @JSONField(name = "hrpatentname")
    @JsonProperty("hrpatentname")
    private String hrpatentname;
    /**
     * 建立时间
     */
    @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.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 = "activetime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "activetime" , format="yyyy-MM-dd")
    @JsonProperty("activetime")
    private Timestamp activetime;
    /**
     * 附件
     */
    @TableField(value = "attachment")
    @JSONField(name = "attachment")
    @JsonProperty("attachment")
    private String attachment;
    /**
     * 专利号
     */
    @TableField(value = "patentcode")
    @JSONField(name = "patentcode")
    @JsonProperty("patentcode")
    private String patentcode;
    /**
     * 专利批准国别
     */
    @TableField(value = "patentcountry")
    @JSONField(name = "patentcountry")
    @JsonProperty("patentcountry")
    private String patentcountry;

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



    /**
     * 设置 [专利名称]
     */
    public void setHrpatentname(String hrpatentname){
        this.hrpatentname = hrpatentname ;
        this.modify("hrpatentname",hrpatentname);
    }

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

    /**
     * 设置 [获取时间]
     */
    public void setActivetime(Timestamp activetime){
        this.activetime = activetime ;
        this.modify("activetime",activetime);
    }

    /**
     * 格式化日期 [获取时间]
     */
    public String formatActivetime(){
        if (this.activetime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(activetime);
    }
    /**
     * 设置 [附件]
     */
    public void setAttachment(String attachment){
        this.attachment = attachment ;
        this.modify("attachment",attachment);
    }

    /**
     * 设置 [专利号]
     */
    public void setPatentcode(String patentcode){
        this.patentcode = patentcode ;
        this.modify("patentcode",patentcode);
    }

    /**
     * 设置 [专利批准国别]
     */
    public void setPatentcountry(String patentcountry){
        this.patentcountry = patentcountry ;
        this.modify("patentcountry",patentcountry);
    }


}


