package com.mortals.xhx.module.attendance.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.mortals.framework.annotation.Excel;
import com.mortals.xhx.module.attendance.model.vo.AttendanceVacationRecordVo;

import java.math.BigDecimal;
/**
 * 员工假期记录信息实体对象
 *
 * @author zxfei
 * @date 2023-04-14
 */

public class AttendanceVacationRecordEntity extends AttendanceVacationRecordVo {
    private static final long serialVersionUID = 1L;

    /**
     * 员工id
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    @Excel(name = "员工姓名")
    private String staffName;
    /**
     * 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
     */
    @Excel(name = "请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)")
    private Integer type;
    /**
     * 增减类型(1.增加,2.扣除)
     */
    @Excel(name = "增减类型(1.增加,2.扣除)")
    private Integer subAddType;
    /**
     * 有效期
     */
    @Excel(name = "有效期")
    private String validityPeriod;
    /**
     * 增加或扣减天数（天）
     */
    @Excel(name = "增加或扣减天数(天)")
    private BigDecimal subOrAddDays;
    /**
     * 内容
     */
    @Excel(name = "内容")
    private String content;
    /**
     * 规则
     */
    @Excel(name = "规则")
    private String rule;
    /**
     * 理由
     */
    @Excel(name = "理由")
    private String reason;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;



    public AttendanceVacationRecordEntity(){}
    /**
     * 获取 员工id
     * @return Long
     */
    public Long getStaffId(){
        return staffId;
    }
    /**
     * 设置 员工id
     * @param staffId
     */
    public void setStaffId(Long staffId){
        this.staffId = staffId;
    }
    /**
     * 获取 员工姓名
     * @return String
     */
    public String getStaffName(){
        return staffName;
    }
    /**
     * 设置 员工姓名
     * @param staffName
     */
    public void setStaffName(String staffName){
        this.staffName = staffName;
    }
    /**
     * 获取 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
     * @return Integer
     */
    public Integer getType(){
        return type;
    }
    /**
     * 设置 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
     * @param type
     */
    public void setType(Integer type){
        this.type = type;
    }
    /**
     * 获取 增减类型(1.增加,2.扣除)
     * @return Integer
     */
    public Integer getSubAddType(){
        return subAddType;
    }
    /**
     * 设置 增减类型(1.增加,2.扣除)
     * @param subAddType
     */
    public void setSubAddType(Integer subAddType){
        this.subAddType = subAddType;
    }
    /**
     * 获取 有效期
     * @return String
     */
    public String getValidityPeriod(){
        return validityPeriod;
    }
    /**
     * 设置 有效期
     * @param validityPeriod
     */
    public void setValidityPeriod(String validityPeriod){
        this.validityPeriod = validityPeriod;
    }
    /**
     * 获取 增加或扣减天数（天）
     * @return BigDecimal
     */
    public BigDecimal getSubOrAddDays(){
        return subOrAddDays;
    }
    /**
     * 设置 增加或扣减天数（天）
     * @param subOrAddDays
     */
    public void setSubOrAddDays(BigDecimal subOrAddDays){
        this.subOrAddDays = subOrAddDays;
    }
    /**
     * 获取 内容
     * @return String
     */
    public String getContent(){
        return content;
    }
    /**
     * 设置 内容
     * @param content
     */
    public void setContent(String content){
        this.content = content;
    }
    /**
     * 获取 规则
     * @return String
     */
    public String getRule(){
        return rule;
    }
    /**
     * 设置 规则
     * @param rule
     */
    public void setRule(String rule){
        this.rule = rule;
    }
    /**
     * 获取 理由
     * @return String
     */
    public String getReason(){
        return reason;
    }
    /**
     * 设置 理由
     * @param reason
     */
    public void setReason(String reason){
        this.reason = reason;
    }
    /**
     * 获取 备注
     * @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 AttendanceVacationRecordEntity) {
            AttendanceVacationRecordEntity tmp = (AttendanceVacationRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",staffId:").append(getStaffId());
        sb.append(",staffName:").append(getStaffName());
        sb.append(",type:").append(getType());
        sb.append(",subAddType:").append(getSubAddType());
        sb.append(",validityPeriod:").append(getValidityPeriod());
        sb.append(",subOrAddDays:").append(getSubOrAddDays());
        sb.append(",content:").append(getContent());
        sb.append(",rule:").append(getRule());
        sb.append(",reason:").append(getReason());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

        this.staffId = null;

        this.staffName = "";

        this.type = null;

        this.subAddType = 1;

        this.validityPeriod = "0";

        this.subOrAddDays = BigDecimal.valueOf(0);

        this.content = "";

        this.rule = "";

        this.reason = "";

        this.remark = "";
    }
}