/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

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

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

/**
 * 社保购买规则明细表
 *
 * @author fxj
 * @date 2025-10-09 11:13:18
 */
@Data
@TableName("t_auto_social_rule_rel")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "社保购买规则明细表")
public class TAutoSocialRuleRel extends BaseEntity {

	/**
	 * 主键ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty("主键ID")
	@Schema(description = "主键ID")
	private String id;
	/**
	 * 社保配置ID
	 */
	@ExcelAttribute(name = "社保配置ID", isNotEmpty = false, errorInfo = "社保配置ID不能为空", maxLength = 32)
	@Length(max = 32, message = "社保配置ID不能超过32个字符")
	@ExcelProperty("社保配置ID")
	@Schema(description = "社保配置ID")
	private String mainId;
	/**
	 * 配置名称
	 */
	@ExcelAttribute(name = "配置名称", isNotEmpty = true, errorInfo = "配置名称不能为空", maxLength = 50)
	@NotBlank(message = "配置名称不能为空")
	@Length(max = 50, message = "配置名称不能超过50个字符")
	@ExcelProperty("配置名称")
	@Schema(description = "配置名称")
	private String configName;
	/**
	 * 社保户ID
	 */
	@ExcelAttribute(name = "社保户ID", maxLength = 50, isNotEmpty = true, errorInfo = "社保户不能为空")
	@Length(max = 50, message = "社保户ID不能超过50个字符")
	@ExcelProperty("社保户ID")
	@Schema(description = "社保户ID")
	private String configHouseId;

	/**
	 * 社保户名称
	 */
	@ExcelAttribute(name = "社保户名称", maxLength = 50, isNotEmpty = true, errorInfo = "社保户名称不能为空")
	@Length(max = 50, message = "社保户名称不能超过50个字符")
	@ExcelProperty("社保户名称")
	@Schema(description = "社保户名称")
	private String configHouseName;
	/**
	 * 社保起缴日期是否一致(0-是,1-否)
	 */
	@ExcelAttribute(name = "社保起缴日期是否一致", maxLength = 1, isNotEmpty = true, errorInfo = "社保起缴日期是否一致不能为空")
	@Length(max = 1, message = "社保起缴日期是否一致不能超过1个字符")
	@ExcelProperty("社保起缴日期是否一致")
	@Schema(description = "社保起缴日期是否一致(0-是,1-否)")
	private String socialDateFlag;
	/**
	 * 起缴日期类型：0 入职日期  1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月
	 * 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月
	 * 原：0 入职日期
	 */
	@ExcelAttribute(name = "起缴日期类型", maxLength = 2)
	@Length(max = 2, message = "起缴日期类型不能超过2个字符")
	@ExcelProperty("起缴日期类型")
	@Schema(description = "起缴日期类型：0 入职日期  1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月")
	private String socialDateType;
	/**
	 * 缴纳类型：0最低、1自定义、2最高
	 */
	@ExcelAttribute(name = "缴纳类型", maxLength = 2, isNotEmpty = true, errorInfo = "缴纳类型不能为空")
	@Length(max = 2, message = "缴纳类型不能超过2个字符")
	@ExcelProperty("缴纳类型")
	@Schema(description = "缴纳类型：0最低、1自定义、2最高")
	private String paymentType;
	/**
	 * 备案基数类型：0固定值1自定义
	 */
	@ExcelAttribute(name = "备案基数类型", maxLength = 2 ,isNotEmpty = true, errorInfo = "备案基数类型不能为空")
	@Length(max = 2, message = "备案基数类型不能超过2个字符")
	@ExcelProperty("备案基数类型")
	@Schema(description = "备案基数类型：0固定值1自定义")
	private String recordBaseType;
	/**
	 * 备案基数
	 */
	@ExcelAttribute(name = "备案基数", maxLength = 30)
	@Length(max = 30, message = "备案基数不能超过30个字符")
	@ExcelProperty("备案基数")
	@Schema(description = "备案基数")
	private String recordBase;
	/**
	 * 委托备注（字典值）
	 */
	@ExcelAttribute(name = "委托备注", maxLength = 100)
	@Length(max = 100, message = "委托备注不能超过100个字符")
	@ExcelProperty("委托备注")
	@Schema(description = "委托备注（字典值）")
	private String remarkDict;
	/**
	 * 项目编码
	 */
	@ExcelAttribute(name = "项目编码",maxLength = 50)
	@NotBlank(message = "项目编码不能为空")
	@Length(max = 50, message = "项目编码不能超过50个字符")
	@ExcelProperty("项目编码")
	@Schema(description = "项目编码")
	private String deptNo;
	/**
	 * 项目ID
	 */
	@ExcelAttribute(name = "项目ID",maxLength = 50)
	@NotBlank(message = "项目ID不能为空")
	@Length(max = 50, message = "项目ID不能超过50个字符")
	@ExcelProperty("项目ID")
	@Schema(description = "项目ID")
	private String deptId;

	/**
	 * 缴纳地-省（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-省（社保或公积金）")
	@Schema(description = "缴纳地-省（社保或公积金）")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("缴纳地-省（社保或公积金）")
	private Integer province;

	/**
	 * 缴纳地-市（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-市（社保或公积金）")
	@Schema(description = "缴纳地-市（社保或公积金）")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("缴纳地-市（社保或公积金）")
	private Integer city;

	/**
	 * 缴纳地-县（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-县（社保或公积金）")
	@Schema(description = "缴纳地-县（社保或公积金）")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("缴纳地-县（社保或公积金）")
	private Integer town;

	/**
	 * 基数上限（社保或公积金）
	 */
	@ExcelAttribute(name = "基数上限（社保或公积金）")
	@Schema(description = "基数上限（社保或公积金）")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("基数上限（社保或公积金）")
	private BigDecimal upperLimit;

	/**
	 * 基数下限（社保或公积金）
	 */
	@ExcelAttribute(name = "基数下限（社保或公积金）")
	@Schema(description = "基数下限（社保或公积金）")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("基数下限（社保或公积金）")
	private BigDecimal lowerLimit;

	/**
	 * 养老基数上限
	 */
	@ExcelAttribute(name = "养老基数上限")
	@Schema(description = "养老基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("养老基数上限")
	private BigDecimal upPersion;

	/**
	 * 医疗基数上限
	 */
	@ExcelAttribute(name = "医疗基数上限")
	@Schema(description = "医疗基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("医疗基数上限")
	private BigDecimal upMedical;

	/**
	 * 失业基数上限
	 */
	@ExcelAttribute(name = "失业基数上限")
	@Schema(description = "失业基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("失业基数上限")
	private BigDecimal upUnemployment;

	/**
	 * 工伤基数上限
	 */
	@ExcelAttribute(name = "工伤基数上限")
	@Schema(description = "工伤基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("工伤基数上限")
	private BigDecimal upInjury;

	/**
	 * 生育基数上限
	 */
	@ExcelAttribute(name = "生育基数上限")
	@Schema(description = "生育基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("生育基数上限")
	private BigDecimal upBirth;

	/**
	 * 大病基数上限
	 */
	@ExcelAttribute(name = "大病基数上限")
	@Schema(description = "大病基数上限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("大病基数上限")
	private BigDecimal upBig;

	/**
	 * 养老基数下限
	 */
	@ExcelAttribute(name = "养老基数下限")
	@Schema(description = "养老基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("养老基数下限")
	private BigDecimal lowerPersion;

	/**
	 * 医疗基数下限
	 */
	@ExcelAttribute(name = "医疗基数下限")
	@Schema(description = "医疗基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("医疗基数下限")
	private BigDecimal lowerMedical;

	/**
	 * 失业基数下限
	 */
	@ExcelAttribute(name = "失业基数下限")
	@Schema(description = "失业基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("失业基数下限")
	private BigDecimal lowerUnemployment;

	/**
	 * 工伤基数下限
	 */
	@ExcelAttribute(name = "工伤基数下限")
	@Schema(description = "工伤基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("工伤基数下限")
	private BigDecimal lowerInjury;

	/**
	 * 生育基数下限
	 */
	@ExcelAttribute(name = "生育基数下限")
	@Schema(description = "生育基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("生育基数下限")
	private BigDecimal lowerBirth;

	/**
	 * 大病基数下限
	 */
	@ExcelAttribute(name = "大病基数下限")
	@Schema(description = "大病基数下限")
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("大病基数下限")
	private BigDecimal lowerBig;
}
