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 com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
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.time.LocalDate;
import java.time.LocalDateTime;


/**
 * 各地市最低工资标准
 *
 * @author hgw
 * @date 2019-10-15 21:45:23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_min_salary")
@Tag(name = "薪资配置-最低工资配置")
public class TMinSalary extends BaseEntity {
     private static final long serialVersionUID = 1L;
     /**
      * id
      */
     @TableId(type = IdType.ASSIGN_ID)
     @ExcelProperty(value = "id")
     private String id;
     /**
      * 省
      */
     @ExcelAttribute(name = "省")
     @ExcelProperty(value = "省")
     private Integer province;
     /**
      * 市
      */
     @ExcelAttribute(name = "市")
     @ExcelProperty(value = "市")
     private Integer city;
     /**
      * 县
      */
     @ExcelAttribute(name = "县")
     @ExcelProperty(value = "县")
     private Integer town;
     /**
      * 最低工资标准
      */
     @NotBlank(message = "最低工资标准不能为空")
     @Length(max = 11, message = "最低工资标准不能超过11个字符")
     @ExcelAttribute(name = "最低工资标准", isNotEmpty = true, errorInfo = "最低工资标准不能为空", maxLength = 11)
     @ExcelProperty(value = "最低工资标准")
     private String salaryBase;
     /**
      * 1.启用 2.停用
      */
     @NotNull(message = "1.启用 2.停用不能为空")
     @ExcelAttribute(name = "1.启用 2.停用", isNotEmpty = true, errorInfo = "1.启用 2.停用不能为空")
     @ExcelProperty(value = "1.启用 2.停用")
     private Integer status;
     /**
      * 起始时间
      */
     @ExcelAttribute(name = "起始时间")
     @ExcelProperty(value = "起始时间")
     private LocalDate startDate;
     /**
      * 终止时间
      */
     @ExcelAttribute(name = "终止时间")
     @ExcelProperty(value = "终止时间")
     private LocalDate endDate;
}
