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.AttendanceRecordHikVo;
import lombok.Data;
/**
 * 基础考勤打卡记录汇总信息实体对象
 *
 * @author zxfei
 * @date 2023-07-18
 */
@Data
public class AttendanceRecordHikEntity extends AttendanceRecordHikVo {
    private static final long serialVersionUID = 1L;

    /**
     * 员工ID
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    @Excel(name = "员工姓名")
    private String staffName;
    /**
     * 工号
     */
    @Excel(name = "工号")
    private String workNum;
    /**
     * 所属部门
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 职位ID
     */
    private Long positionId;
    /**
     * 职位名称
     */
    @Excel(name = "职位名称")
    private String positionName;
    /**
     * 所属考勤组ID
     */
    private Long attendanceGroupId;
    /**
     * 所属考勤组名称
     */
    private String attendanceGroupName;
    /**
     * 班次ID
     */
    private Long shiftsId;
    /**
     * 班次名称
     */
    private String shiftsName;
    /**
     * 考勤日期
     */
    @Excel(name = "考勤日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date attendanceDate;
    /**
     * 考勤点名称
     */
    @Excel(name = "考勤点名称")
    private String attendanceAddress;
    /**
     * 事件源
     */
    @Excel(name = "事件源")
    private String eventSource;
    /**
     * 备注
     */
    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 AttendanceRecordHikEntity) {
            AttendanceRecordHikEntity tmp = (AttendanceRecordHikEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.staffId = 0L;

        this.staffName = "";

        this.workNum = "";

        this.deptId = 0L;

        this.deptName = "";

        this.positionId = 0L;

        this.positionName = "";

        this.attendanceGroupId = 0L;

        this.attendanceGroupName = "";

        this.shiftsId = 0L;

        this.shiftsName = "";

        this.attendanceDate = null;

        this.attendanceAddress = "";

        this.eventSource = "";

        this.remark = "";

        this.signInResult = 0;

        this.signOutResult = 0;

        this.attendType = "";

        this.punchResult = 0;
    }
}