package com.willalp.vacation.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 假期规则对象 hs_vacation_rule
 *
 * @author willalp
 * @date 2023-03-19
 */

@TableName("hs_vacation_rule")
public class HsVacationRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String id;

    /** 假期名称 */
    @Excel(name = "假期名称")
    private String name;

    /** 请假单位 */
    @Excel(name = "请假单位")
    private String unit;

    /** 计算方式 */
    @Excel(name = "计算方式")
    private String formulaMode;

    /** 发放规则 */
    @Excel(name = "发放规则")
    private String giveOutRule;

    /** 发放日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date giveOutDate;

    /** 余额规则 */
    @Excel(name = "余额规则")
    private String balanceRule;

    /** 适用范围 */
    @Excel(name = "适用范围")
    private String application;

    /** 是否删除（0.未删除；1.已删除） */
    @Excel(name = "是否删除", readConverterExp = "0=.未删除；1.已删除")
    @TableLogic
    private Integer isDelete;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }
    public void setFormulaMode(String formulaMode)
    {
        this.formulaMode = formulaMode;
    }

    public String getFormulaMode()
    {
        return formulaMode;
    }
    public void setGiveOutRule(String giveOutRule)
    {
        this.giveOutRule = giveOutRule;
    }

    public String getGiveOutRule()
    {
        return giveOutRule;
    }
    public void setGiveOutDate(Date giveOutDate)
    {
        this.giveOutDate = giveOutDate;
    }

    public Date getGiveOutDate()
    {
        return giveOutDate;
    }
    public void setBalanceRule(String balanceRule)
    {
        this.balanceRule = balanceRule;
    }

    public String getBalanceRule()
    {
        return balanceRule;
    }
    public void setApplication(String application)
    {
        this.application = application;
    }

    public String getApplication()
    {
        return application;
    }
    public void setIsDelete(Integer isDelete)
    {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete()
    {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("unit", getUnit())
            .append("formulaMode", getFormulaMode())
            .append("giveOutRule", getGiveOutRule())
            .append("giveOutDate", getGiveOutDate())
            .append("balanceRule", getBalanceRule())
            .append("application", getApplication())
            .append("isDelete", getIsDelete())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
