package com.mortals.xhx.module.staff.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffContractVo;
import lombok.Data;
/**
 * 员工合同信息实体对象
 *
 * @author zxfei
 * @date 2023-07-26
 */
@Data
public class StaffContractEntity extends StaffContractVo {
    private static final long serialVersionUID = 1L;

    /**
     * 员工ID
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    private String staffName;
    /**
     * 性别(1.男,2.女)
     */
    private Integer gender;
    /**
     * 出生日期
     */
    private Date birthday;
    /**
     * 照片
     */
    private String photoPath;
    /**
     * 联系电话
     */
    private String phoneNumber;
    /**
     * 身份证号码
     */
    private String idCard;
    /**
     * 工号
     */
    private String workNum;
    /**
     * 政治面貌 （1.中共党员，2.中共预备党员，3.共青团员，4.群众，5.其它)
     */
    private Integer politicalstatus;
    /**
     * 所属部门
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 职位ID
     */
    private Long jobId;
    /**
     * 职位名称
     */
    private String jobName;
    /**
     * 员工类型(1.全职,2.兼职,3.实习)
     */
    private Integer staffType;
    /**
     * 员工状态(1.正式,2.试用,3.离职)
     */
    private Integer status;
    /**
     * 入职时间
     */
    private Date entryDate;
    /**
     * 现合同开始时间
     */
    private Date contractStartDate;
    /**
     * 现合同到期时间
     */
    private Date contractEndDate;
    /**
     * 合同公司
     */
    private String contractCompany;
    /**
     * 合同类型(1.纸质)
     */
    private Integer contractType;
    /**
     * 新合同开始时间
     */
    private Date newStartDate;
    /**
     * 新合同到期时间
     */
    private Date newEndDate;
    /**
     * 审核状态(0.待审核,1.通过,2.拒绝)
     */
    private Integer auditStatus;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof StaffContractEntity) {
            StaffContractEntity tmp = (StaffContractEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.staffId = 0L;
        this.staffName = "";
        this.gender = 1;
        this.birthday = new Date();
        this.photoPath = "";
        this.phoneNumber = "";
        this.idCard = "";
        this.workNum = "";
        this.politicalstatus = 1;
        this.deptId = 0L;
        this.deptName = "";
        this.jobId = 0L;
        this.jobName = "";
        this.staffType = 1;
        this.status = 1;
        this.entryDate = new Date();
        this.contractStartDate = new Date();
        this.contractEndDate = new Date();
        this.contractCompany = "";
        this.contractType = 1;
        this.newStartDate = new Date();
        this.newEndDate = new Date();
        this.auditStatus = 0;
    }
}