package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformAttendRecordVo;
import lombok.Data;
/**
* 考勤绩效记录信息实体对象
*
* @author zxfei
* @date 2023-05-17
*/
@Data
public class PerformAttendRecordEntity extends PerformAttendRecordVo {
    private static final long serialVersionUID = 1L;

    /**
    * 员工ID
    */
    private Long staffId;
    /**
    * 员工姓名
    */
    private String staffName;
    /**
    * 工号
    */
    private String workNum;
    /**
    * 所属部门
    */
    private Long deptId;
    /**
    * 所属部门名称
    */
    private String deptName;
    /**
    * 职位ID
    */
    private Long positionId;
    /**
    * 职位名称
    */
    private String positionName;
    /**
    * 所属考勤组ID
    */
    private Long attendanceGroupId;
    /**
    * 所属考勤组名称
    */
    private String attendanceGroupName;
    /**
    * 班次ID
    */
    private Long shiftsId;
    /**
    * 班次名称
    */
    private String shiftsName;
    /**
    * 考勤时间
    */
    private Date attendanceDate;
    /**
    * 绩效规则id
    */
    private Long ruleId;
    /**
    * 规则名称
    */
    private String ruleName;
    /**
    * 增减类型(1.增加,2.扣除)
    */
    private Integer subAddType;
    /**
    * 扣分或增加分值
    */
    private BigDecimal score;
    /**
    * 备注
    */
    private String remark;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PerformAttendRecordEntity) {
            PerformAttendRecordEntity tmp = (PerformAttendRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.staffId = -1L;

            this.staffName = "";

            this.workNum = "";

            this.deptId = -1L;

            this.deptName = "";

            this.positionId = -1L;

            this.positionName = "";

            this.attendanceGroupId = -1L;

            this.attendanceGroupName = "";

            this.shiftsId = -1L;

            this.shiftsName = "";

            this.attendanceDate = null;

            this.ruleId = -1L;

            this.ruleName = "";

            this.subAddType = 1;

            this.score = BigDecimal.valueOf(0.00);

            this.remark = "";
    }
}