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_HRWORKRECORD",resultMap = "HRWorkRecordResultMap")
public class HRWorkRecord extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 工作履历标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrworkrecordid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrworkrecordid")
    @JsonProperty("hrworkrecordid")
    private String hrworkrecordid;
    /**
     * 工作履历名称
     */
    @TableField(value = "hrworkrecordname")
    @JSONField(name = "hrworkrecordname")
    @JsonProperty("hrworkrecordname")
    private String hrworkrecordname;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 建立时间
     */
    @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.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 = "begintime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "begintime" , format="yyyy-MM-dd")
    @JsonProperty("begintime")
    private Timestamp begintime;
    /**
     * 结束时间
     */
    @TableField(value = "endtime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "endtime" , format="yyyy-MM-dd")
    @JsonProperty("endtime")
    private Timestamp endtime;
    /**
     * 工作单位
     */
    @TableField(value = "workorganization")
    @JSONField(name = "workorganization")
    @JsonProperty("workorganization")
    private String workorganization;
    /**
     * 部门
     */
    @TableField(value = "workdepartment")
    @JSONField(name = "workdepartment")
    @JsonProperty("workdepartment")
    private String workdepartment;
    /**
     * 职务
     */
    @TableField(value = "duty")
    @JSONField(name = "duty")
    @JsonProperty("duty")
    private String duty;
    /**
     * 职位
     */
    @TableField(value = "post")
    @JSONField(name = "post")
    @JsonProperty("post")
    private String post;
    /**
     * 主要经历
     */
    @TableField(value = "mainwork")
    @JSONField(name = "mainwork")
    @JsonProperty("mainwork")
    private Integer mainwork;

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



    /**
     * 设置 [工作履历名称]
     */
    public void setHrworkrecordname(String hrworkrecordname){
        this.hrworkrecordname = hrworkrecordname ;
        this.modify("hrworkrecordname",hrworkrecordname);
    }

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

    /**
     * 设置 [开始时间]
     */
    public void setBegintime(Timestamp begintime){
        this.begintime = begintime ;
        this.modify("begintime",begintime);
    }

    /**
     * 格式化日期 [开始时间]
     */
    public String formatBegintime(){
        if (this.begintime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(begintime);
    }
    /**
     * 设置 [结束时间]
     */
    public void setEndtime(Timestamp endtime){
        this.endtime = endtime ;
        this.modify("endtime",endtime);
    }

    /**
     * 格式化日期 [结束时间]
     */
    public String formatEndtime(){
        if (this.endtime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(endtime);
    }
    /**
     * 设置 [工作单位]
     */
    public void setWorkorganization(String workorganization){
        this.workorganization = workorganization ;
        this.modify("workorganization",workorganization);
    }

    /**
     * 设置 [部门]
     */
    public void setWorkdepartment(String workdepartment){
        this.workdepartment = workdepartment ;
        this.modify("workdepartment",workdepartment);
    }

    /**
     * 设置 [职务]
     */
    public void setDuty(String duty){
        this.duty = duty ;
        this.modify("duty",duty);
    }

    /**
     * 设置 [职位]
     */
    public void setPost(String post){
        this.post = post ;
        this.modify("post",post);
    }

    /**
     * 设置 [主要经历]
     */
    public void setMainwork(Integer mainwork){
        this.mainwork = mainwork ;
        this.modify("mainwork",mainwork);
    }


}


