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_HRPAPER",resultMap = "HRPaperResultMap")
public class HRPaper extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 论文信息标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrpaperid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrpaperid")
    @JsonProperty("hrpaperid")
    private String hrpaperid;
    /**
     * 建立人
     */
    @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;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 论文名称
     */
    @TableField(value = "hrpapername")
    @JSONField(name = "hrpapername")
    @JsonProperty("hrpapername")
    private String hrpapername;
    /**
     * 建立时间
     */
    @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;
    /**
     * 员工标识
     */
    @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 = "publisher")
    @JSONField(name = "publisher")
    @JsonProperty("publisher")
    private String publisher;
    /**
     * 刊物名称
     */
    @TableField(value = "publication")
    @JSONField(name = "publication")
    @JsonProperty("publication")
    private String publication;
    /**
     * 刊物期数
     */
    @TableField(value = "publicationnum")
    @JSONField(name = "publicationnum")
    @JsonProperty("publicationnum")
    private String publicationnum;
    /**
     * 个人在论文著作中排名
     */
    @TableField(value = "position")
    @JSONField(name = "position")
    @JsonProperty("position")
    private BigInteger position;

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



    /**
     * 设置 [论文名称]
     */
    public void setHrpapername(String hrpapername){
        this.hrpapername = hrpapername ;
        this.modify("hrpapername",hrpapername);
    }

    /**
     * 设置 [员工标识]
     */
    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 setPublisher(String publisher){
        this.publisher = publisher ;
        this.modify("publisher",publisher);
    }

    /**
     * 设置 [刊物名称]
     */
    public void setPublication(String publication){
        this.publication = publication ;
        this.modify("publication",publication);
    }

    /**
     * 设置 [刊物期数]
     */
    public void setPublicationnum(String publicationnum){
        this.publicationnum = publicationnum ;
        this.modify("publicationnum",publicationnum);
    }

    /**
     * 设置 [个人在论文著作中排名]
     */
    public void setPosition(BigInteger position){
        this.position = position ;
        this.modify("position",position);
    }


}


