package com.mortals.xhx.module.attendance.model;
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.attendance.model.vo.AttendanceRecordVo;
import lombok.Data;
/**
 * 考勤打卡记录信息实体对象
 *
 * @author zxfei
 * @date 2023-07-18
 */
@Data
public class AttendanceRecordEntity extends AttendanceRecordVo {
    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;
    /**
     * 备注
     */
    private String remark;
    /**
     * 签到结果(0.否,1.是)
     */
    private Integer signInResult;
    /**
     * 签退结果(0.否,1.是)
     */
    private Integer signOutResult;
    /**
     * 考勤类型
     */
    private String attendType;
    /**
     * 打卡结果(0.否,1.是)
     */
    private Integer punchResult;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AttendanceRecordEntity) {
            AttendanceRecordEntity tmp = (AttendanceRecordEntity) 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.remark = "";

        this.signInResult = 0;

        this.signOutResult = 0;

        this.attendType = "现场打卡";

        this.punchResult = 1;
    }
}