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.AttendanceLeaveRecordVo;
import lombok.Data;
/**
 * 请假记录信息实体对象
 *
 * @author zxfei
 * @date 2023-07-18
 */
@Data
public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
    private static final long serialVersionUID = 1L;

    /**
     * 请假人id
     */
    @Excel(name = "请假人id")
    private Long leavePersonId;
    /**
     * 请假人
     */
    private String leavePerson;
    /**
     * 所属部门id
     */
    private Long deptId;
    /**
     * 所属部门
     */
    private String deptName;
    /**
     * 电话号码
     */
    private String phoneNumber;
    /**
     * 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
     */
    private Integer leaveType;
    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 结束时间
     */
    private Date endTime;
    /**
     * 时长,单位秒
     */
    private Integer duration;
    /**
     * 请假事由
     */
    private String reason;
    /**
     * 审批负责人Id
     */
    private Long approverId;
    /**
     * 审批负责人
     */
    private String approver;
    /**
     * 附件
     */
    private String attachment;
    /**
     * 附件路径
     */
    private String attachmentPath;
    /**
     * 备注
     */
    private String remark;
    /**
     * 申请时间
     */
    private Date appealTime;
    /**
     * 审核结果(1.申请通过,2.申请不通过)
     */
    private Integer auditResult;
    /**
     * 审核说明
     */
    private String auditDesc;
    /**
     * 审核时间
     */
    private Date auditTime;
    /**
     * 处理状态
     */
    private Integer processStatus;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AttendanceLeaveRecordEntity) {
            AttendanceLeaveRecordEntity tmp = (AttendanceLeaveRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.leavePersonId = -1L;

        this.leavePerson = "";

        this.deptId = -1L;

        this.deptName = "";

        this.phoneNumber = "";

        this.leaveType = -1;

        this.startTime = null;

        this.endTime = null;

        this.duration = -1;

        this.reason = "";

        this.approverId = -1L;

        this.approver = "";

        this.attachment = "";

        this.attachmentPath = "";

        this.remark = "";

        this.appealTime = null;

        this.auditResult = null;

        this.auditDesc = "";

        this.auditTime = null;

        this.processStatus = 1;
    }
}