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.StaffVo;
import lombok.Data;
/**
 * 员工基本信息实体对象
 *
 * @author zxfei
 * @date 2023-09-28
 */
@Data
public class StaffEntity extends StaffVo {
    private static final long serialVersionUID = 1L;

    /**
     * 员工姓名
     */
    private String name;
    /**
     * 性别(1.男,2.女)
     */
    private Integer gender;
    /**
     * 出生日期
     */
    private Date birthday;
    /**
     * 照片
     */
    private String photoPath;
    /**
     * 联系电话
     */
    private String phoneNumber;
    /**
     * 身份证号码
     */
    private String idCard;
    /**
     * 工号
     */
    private String workNum;
    /**
     * 所属公司
     */
    private String companyIds;
    /**
     * 所属公司名称
     */
    private String companyName;
    /**
     * 职位ID
     */
    private Long positionId;
    /**
     * 职位名称
     */
    private String positionName;
    /**
     * 员工类型（1.全职,2.兼职,3.实习)
     */
    private Integer staffType;
    /**
     * 员工状态(1.正式,2.试用,3.离职)
     */
    private Integer staffStatus;
    /**
     * 员工来源(1.企业内部,2.外部人员)
     */
    private Integer source;
    /**
     * 入职登记表
     */
    private String registerPath;
    /**
     * 入职时间
     */
    private Date entryDate;
    /**
     * 转正时间
     */
    private Date regularDate;
    /**
     * 离职时间
     */
    private Date leaveDate;
    /**
     * 备注
     */
    private String remark;
    /**
     * 累计查看次数
     */
    private Integer sumViews;
    /**
     * 当日查看次数
     */
    private Integer viewsByDay;
    /**
     * 发送名片次数
     */
    private Integer sendBusinessCardTimes;
    /**
     * 邮件地址
     */
    private String email;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof StaffEntity) {
            StaffEntity tmp = (StaffEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.name = "";
        this.gender = 1;
        this.birthday = new Date();
        this.photoPath = "";
        this.phoneNumber = "";
        this.idCard = "";
        this.workNum = "";
        this.companyIds = null;
        this.companyName = "";
        this.positionId = null;
        this.positionName = "";
        this.staffType = 1;
        this.staffStatus = 1;
        this.source = 1;
        this.registerPath = "";
        this.entryDate = new Date();
        this.regularDate = new Date();
        this.leaveDate = new Date();
        this.remark = "";
        this.sumViews = 0;
        this.viewsByDay = 0;
        this.sendBusinessCardTimes = 0;
        this.email = "";
    }
}