package com.yifu.cloud.plus.v1.yifu.salary.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 工资报账配置
 *
 * @author hgw
 * @date 2019-09-12 15:46:57
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_config_salary")
@Tag(name="薪资配置-普通薪资配置")
public class TConfigSalary extends Model<TConfigSalary> implements Serializable {
     private static final long serialVersionUID = 1L;
     /**
      * 主键
      */
     @TableId(type = IdType.ASSIGN_ID)
     @Schema(description="主键")
     private String id;
     /**
      * 配置名称
      */
     @NotBlank(message = "配置名称不能为空")
     @Length(max=50,message = "配置名称不能超过50个字符")
     @ExcelAttribute(name = "配置名称", isNotEmpty = true,errorInfo  = "配置名称不能为空" , maxLength = 50 )
     @ExcelProperty(value="配置名称")
     private String name;
     /**
      * 结算主体ID
      */
     @NotBlank(message = "结算主体ID不能为空")
     @Length(max=32,message = "结算主体ID不能超过32个字符")
     @ExcelAttribute(name = "结算主体ID", isNotEmpty = true,errorInfo  = "结算主体ID不能为空" , maxLength = 32 )
     @ExcelProperty(value="结算主体ID")
     private String departId;
     /**
      * 结算主体编码
      */
     @NotBlank(message = "结算主体编码不能为空")
     @Length(max=32,message = "结算主体编码不能超过32个字符")
     @ExcelAttribute(name = "结算主体编码", isNotEmpty = true,errorInfo  = "结算主体编码不能为空" , maxLength = 32 )
     @ExcelProperty(value="结算主体编码")
     private String departNo;
     /**
      * 结算主体名称
      */
     @NotBlank(message = "结算主体名称不能为空")
     @Length(max=50,message = "结算主体名称不能超过50个字符")
     @ExcelAttribute(name = "结算主体名称", isNotEmpty = true,errorInfo  = "结算主体名称不能为空" , maxLength = 50 )
     @ExcelProperty(value="结算主体名称")
     private String departName;
     /**
      * 工资月份
      */
     @NotNull(message = "工资月份不能为空")
     @ExcelAttribute(name = "工资月份", isNotEmpty = true,errorInfo  = "工资月份不能为空" )
     @ExcelProperty(value="工资月份")
     private Integer salaryMonth;
     /**
      * 结算月份
      */
     @NotNull(message = "结算月份不能为空")
     @ExcelAttribute(name = "结算月份", isNotEmpty = true,errorInfo  = "结算月份不能为空" )
     @ExcelProperty(value="结算月份")
     private Integer settleMonth;
     /**
      * 社保月份
      */
     @NotNull(message = "社保月份不能为空")
     @ExcelAttribute(name = "社保月份", isNotEmpty = true,errorInfo  = "社保月份不能为空" )
     @ExcelProperty(value="社保月份")
     private Integer socialMonth;
     /**
      * 公积金月份
      */
     @NotNull(message = "公积金月份不能为空")
     @ExcelAttribute(name = "公积金月份", isNotEmpty = true,errorInfo  = "公积金月份不能为空" )
     @ExcelProperty(value="公积金月份")
     private Integer fundMonth;
     /**
      * 社保优先级
      */
     @NotNull(message = "社保优先级不能为空")
     @ExcelAttribute(name = "社保优先级", isNotEmpty = true,errorInfo  = "社保优先级不能为空" )
     @ExcelProperty(value="社保优先级（0：生成；1：缴纳）")
     private Integer socialPriority;
     /**
      * 公积金优先级
      */
     @NotNull(message = "公积金优先级不能为空")
     @ExcelAttribute(name = "公积金优先级", isNotEmpty = true,errorInfo  = "公积金优先级不能为空" )
     @ExcelProperty(value="公积金优先级（0：生成；1：缴纳）")
     private Integer fundPriority;
     /**
      * 发放方式
      */
     @NotNull(message = "发放方式不能为空")
     @ExcelAttribute(name = "发放方式", isNotEmpty = true,errorInfo  = "发放方式不能为空" )
     @ExcelProperty(value="发放方式（0：现金；1：转账）")
     private Integer grantType;
     /**
      * 年终奖扣税方案
      */
     @NotNull(message = "年终奖扣税方案不能为空")
     @ExcelAttribute(name = "年终奖扣税方案", errorInfo  = "年终奖扣税方案不能为空" )
     @ExcelProperty(value="年终奖扣税方案（0：合并；1：单独；2：自动计算）")
     private Integer annualBonusType;

}
