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.StaffLeaveVo;
import lombok.Data;
/**
 * 员工离职信息实体对象
 *
 * @author zxfei
 * @date 2023-07-26
 */
@Data
public class StaffLeaveEntity extends StaffLeaveVo {
    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 leaveDate;
    /**
     * 离职原因
     */
    private String leaveReason;
    /**
     * 审核状态(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 StaffLeaveEntity) {
            StaffLeaveEntity tmp = (StaffLeaveEntity) 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.leaveDate = new Date();
        this.leaveReason = "";
        this.auditStatus = 0;
    }
}