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-10-18
*/
@Data
public class StaffLeaveEntity extends StaffLeaveVo {
    private static final long serialVersionUID = 1L;

    /**
    * 员工姓名
    */
    private String name;
    /**
    * 照片
    */
    private String photoPath;
    /**
    * 邮件地址
    */
    private String email;
    /**
    * 联系电话
    */
    private String phoneNumber;
    /**
    * 所属公司
    */
    private String companyIds;
    /**
    * 所属公司名称
    */
    private String companyName;
    /**
    * 职位名称
    */
    private String positionName;
    /**
    * 员工状态(1.正式,2.试用,3.离职)
    */
    private Integer staffStatus;
    /**
    * 离职时间
    */
    private Date leaveDate;
    /**
    * 备注
    */
    private String remark;
    /**
    * 累计查看次数
    */
    private Integer sumViews;
    /**
    * 当日查看次数
    */
    private Integer viewsByDay;
    /**
    * 发送名片次数
    */
    private Integer sendBusinessCardTimes;
    @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.name = "";
            this.photoPath = "";
            this.email = "";
            this.phoneNumber = "";
            this.companyIds = "";
            this.companyName = "";
            this.positionName = "";
            this.staffStatus = 3;
            this.leaveDate = new Date();
            this.remark = "";
            this.sumViews = 0;
            this.viewsByDay = 0;
            this.sendBusinessCardTimes = 0;
    }
}