/*
 *    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.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-11-06 16:26:07
 */
@Data
@TableName("t_auto_fund_rule_rel")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "公积金购买规则明细表")
public class TAutoFundRuleRel extends BaseEntity {

	/**
	 * 主键ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty("主键ID")
	@Schema(description = "主键ID")
	private String id;
	/**
	 * 公积金配置ID
	 */
	@ExcelAttribute(name = "公积金配置ID",  errorInfo = "公积金配置ID不能为空", maxLength = 32)
	@NotBlank(message = "公积金配置ID不能为空")
	@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)
	@Length(max = 50, message = "公积金户ID不能超过50个字符")
	@ExcelProperty("公积金户ID")
	@Schema(description = "公积金户ID")
	private String configHouseId;
	/**
	 * 公积金户名称
	 */
	@ExcelAttribute(name = "公积金户名称", maxLength = 100)
	@Length(max = 100, message = "公积金户名称不能超过100个字符")
	@ExcelProperty("公积金户名称")
	@Schema(description = "公积金户名称")
	private String configHouseName;
	/**
	 * 公积金单位个人比例是否一致(0-是,1-否)
	 */
	@ExcelAttribute(name = "公积金单位个人比例是否一致)", maxLength = 1)
	@Length(max = 1, message = "公积金单位个人比例是否一致不能超过1个字符")
	@ExcelProperty("公积金单位个人比例是否一致")
	@Schema(description = "公积金单位个人比例是否一致(0-是,1-否)")
	private String fundPerFlag;
	/**
	 * 起缴日期类型：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 入职日期 1 入职满1年次月 2 人员自定义
	 */
	@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 fundDateType;
	/**
	 * 缴纳基数类型：0最低、1自定义、2最高、3固定基数
	 */
	@ExcelAttribute(name = "缴纳基数类型", maxLength = 2)
	@Length(max = 2, message = "缴纳基数类型不能超过2个字符")
	@ExcelProperty("缴纳基数类型")
	@Schema(description = "缴纳基数类型：0最低、1自定义、2最高、3固定基数")
	private String paymentType;
	/**
	 * 公积金基数
	 */
	@ExcelAttribute(name = "公积金基数")
	@ExcelProperty("公积金基数")
	@Schema(description = "公积金基数")
	private BigDecimal fundBase;
	/**
	 * 公积金单位比例
	 */
	@ExcelAttribute(name = "公积金单位比例", maxLength = 30)
	@Length(max = 30, message = "公积金单位比例不能超过30个字符")
	@ExcelProperty("公积金单位比例")
	@Schema(description = "公积金单位比例")
	private String fundCompanyPer;
	/**
	 * 公积金个人比例
	 */
	@ExcelAttribute(name = "公积金个人比例", maxLength = 100)
	@Length(max = 100, message = "公积金个人比例不能超过100个字符")
	@ExcelProperty("公积金个人比例")
	@Schema(description = "公积金个人比例")
	private String fundPersonalPer;
	/**
	 * 项目编码
	 */
	@ExcelAttribute(name = "项目编码", errorInfo = "项目编码不能为空", maxLength = 50)
	@NotBlank(message = "项目编码不能为空")
	@Length(max = 50, message = "项目编码不能超过50个字符")
	@ExcelProperty("项目编码")
	@Schema(description = "项目编码")
	private String deptNo;
	/**
	 * 项目ID
	 */
	@ExcelAttribute(name = "项目ID",  errorInfo = "项目ID不能为空", maxLength = 50)
	@NotBlank(message = "项目ID不能为空")
	@Length(max = 50, message = "项目ID不能超过50个字符")
	@ExcelProperty("项目ID")
	@Schema(description = "项目ID")
	private String deptId;

	/**
	 * 缴纳地-省（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-省（社保或公积金）")
	@ExcelProperty("缴纳地-省（社保或公积金）")
	@Schema(description = "缴纳地-省（社保或公积金）")
	private Integer province;
	/**
	 * 缴纳地-市（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-市（社保或公积金）")
	@ExcelProperty("缴纳地-市（社保或公积金）")
	@Schema(description = "缴纳地-市（社保或公积金）")
	private Integer city;
	/**
	 * 缴纳地-县（社保或公积金）
	 */
	@ExcelAttribute(name = "缴纳地-县（社保或公积金）")
	@ExcelProperty("缴纳地-县（社保或公积金）")
	@Schema(description = "缴纳地-县（社保或公积金）")
	private Integer town;
	/**
	 * 基数上限（社保或公积金）
	 */
	@ExcelAttribute(name = "基数上限（社保或公积金）")
	@ExcelProperty("基数上限（社保或公积金）")
	@Schema(description = "基数上限（社保或公积金）")
	private BigDecimal upperLimit;
	/**
	 * 基数下限（社保或公积金）
	 */
	@ExcelAttribute(name = "基数下限（社保或公积金）")
	@ExcelProperty("基数下限（社保或公积金）")
	@Schema(description = "基数下限（社保或公积金）")
	private BigDecimal lowerLimit;

}
