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;
/**
* 请假记录信息实体对象
*
* @author zxfei
* @date 2023-04-07
*/

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.丧假)
    */
    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;



    public AttendanceLeaveRecordEntity(){}
    /**
    * 获取 请假人id
    * @return Long
    */
    public Long getLeavePersonId(){
        return leavePersonId;
    }
    /**
    * 设置 请假人id
    * @param leavePersonId
    */
    public void setLeavePersonId(Long leavePersonId){
        this.leavePersonId = leavePersonId;
    }
    /**
    * 获取 请假人
    * @return String
    */
    public String getLeavePerson(){
        return leavePerson;
    }
    /**
    * 设置 请假人
    * @param leavePerson
    */
    public void setLeavePerson(String leavePerson){
        this.leavePerson = leavePerson;
    }
    /**
    * 获取 所属部门id
    * @return Long
    */
    public Long getDeptId(){
        return deptId;
    }
    /**
    * 设置 所属部门id
    * @param deptId
    */
    public void setDeptId(Long deptId){
        this.deptId = deptId;
    }
    /**
    * 获取 所属部门
    * @return String
    */
    public String getDeptName(){
        return deptName;
    }
    /**
    * 设置 所属部门
    * @param deptName
    */
    public void setDeptName(String deptName){
        this.deptName = deptName;
    }
    /**
    * 获取 电话号码
    * @return String
    */
    public String getPhoneNumber(){
        return phoneNumber;
    }
    /**
    * 设置 电话号码
    * @param phoneNumber
    */
    public void setPhoneNumber(String phoneNumber){
        this.phoneNumber = phoneNumber;
    }
    /**
    * 获取 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假)
    * @return Integer
    */
    public Integer getLeaveType(){
        return leaveType;
    }
    /**
    * 设置 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假)
    * @param leaveType
    */
    public void setLeaveType(Integer leaveType){
        this.leaveType = leaveType;
    }
    /**
    * 获取 开始时间
    * @return Date
    */
    public Date getStartTime(){
        return startTime;
    }
    /**
    * 设置 开始时间
    * @param startTime
    */
    public void setStartTime(Date startTime){
        this.startTime = startTime;
    }
    /**
    * 获取 结束时间
    * @return Date
    */
    public Date getEndTime(){
        return endTime;
    }
    /**
    * 设置 结束时间
    * @param endTime
    */
    public void setEndTime(Date endTime){
        this.endTime = endTime;
    }
    /**
    * 获取 时长,单位秒
    * @return Integer
    */
    public Integer getDuration(){
        return duration;
    }
    /**
    * 设置 时长,单位秒
    * @param duration
    */
    public void setDuration(Integer duration){
        this.duration = duration;
    }
    /**
    * 获取 请假事由
    * @return String
    */
    public String getReason(){
        return reason;
    }
    /**
    * 设置 请假事由
    * @param reason
    */
    public void setReason(String reason){
        this.reason = reason;
    }
    /**
    * 获取 审批负责人Id
    * @return Long
    */
    public Long getApproverId(){
        return approverId;
    }
    /**
    * 设置 审批负责人Id
    * @param approverId
    */
    public void setApproverId(Long approverId){
        this.approverId = approverId;
    }
    /**
    * 获取 审批负责人
    * @return String
    */
    public String getApprover(){
        return approver;
    }
    /**
    * 设置 审批负责人
    * @param approver
    */
    public void setApprover(String approver){
        this.approver = approver;
    }
    /**
    * 获取 附件
    * @return String
    */
    public String getAttachment(){
        return attachment;
    }
    /**
    * 设置 附件
    * @param attachment
    */
    public void setAttachment(String attachment){
        this.attachment = attachment;
    }
    /**
    * 获取 附件路径
    * @return String
    */
    public String getAttachmentPath(){
        return attachmentPath;
    }
    /**
    * 设置 附件路径
    * @param attachmentPath
    */
    public void setAttachmentPath(String attachmentPath){
        this.attachmentPath = attachmentPath;
    }
    /**
    * 获取 备注
    * @return String
    */
    public String getRemark(){
        return remark;
    }
    /**
    * 设置 备注
    * @param remark
    */
    public void setRemark(String remark){
        this.remark = remark;
    }




    @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 String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",leavePersonId:").append(getLeavePersonId());
        sb.append(",leavePerson:").append(getLeavePerson());
        sb.append(",deptId:").append(getDeptId());
        sb.append(",deptName:").append(getDeptName());
        sb.append(",phoneNumber:").append(getPhoneNumber());
        sb.append(",leaveType:").append(getLeaveType());
        sb.append(",startTime:").append(getStartTime());
        sb.append(",endTime:").append(getEndTime());
        sb.append(",duration:").append(getDuration());
        sb.append(",reason:").append(getReason());
        sb.append(",approverId:").append(getApproverId());
        sb.append(",approver:").append(getApprover());
        sb.append(",attachment:").append(getAttachment());
        sb.append(",attachmentPath:").append(getAttachmentPath());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

            this.leavePersonId = null;

            this.leavePerson = "";

            this.deptId = null;

            this.deptName = "";

            this.phoneNumber = "";

            this.leaveType = null;

            this.startTime = null;

            this.endTime = null;

            this.duration = null;

            this.reason = "";

            this.approverId = null;

            this.approver = "";

            this.attachment = "";

            this.attachmentPath = "";

            this.remark = "";
    }
}