package org.dromara.payment.earlyWarn.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.payment.earlyWarn.domain.LgEarlyWarn;

import java.math.BigDecimal;

/**
 * 风控预警设置业务对象 lg_early_warn
 *
 * @author LionLi
 * @date 2025-06-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = LgEarlyWarn.class, reverseConvertGenerate = false)
public class LgEarlyWarnBo extends BaseEntity {

    /**
     * 自增主键
     */
    @NotNull(message = "自增主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 风险类型[1：单人单笔发放金额预警 2：批次内单笔金额占比预警 3：批次内发放金额相似预警 4：单人每年发放金额预警 5：单人连续月份发放金额相似预警 6：企业风险预警 7：发放年龄预警 8：企业高管身份预警]
     */
    @NotNull(message = "风险类型[1：单人单笔发放金额预警 2：批次内单笔金额占比预警 3：批次内发放金额相似预警 4：单人每年发放金额预警 5：单人连续月份发放金额相似预警 6：企业风险预警 7：发放年龄预警 8：企业高管身份预警]不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer riskType;

    /**
     * 触发规则[1 单人单笔金额 2 批次占比 3 离散度 4 单人每年金额 5 单人连续月份 6 企业信息异常（经营异常、行政处罚、违法欠税等）7 发放人员年龄 8 发放人员姓名命中企业高管名单]
     */
    @NotNull(message = "触发规则[1 单人单笔金额 2 批次占比 3 离散度 4 单人每年金额 5 单人连续月份 6 企业信息异常（经营异常、行政处罚、违法欠税等）7 发放人员年龄 8 发放人员姓名命中企业高管名单]不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer triggerRule;

    /**
     * 单人单笔金额
     */
    @NotNull(message = "单人单笔金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal singleAmount;

    /**
     * 批次总笔数
     */
    @NotNull(message = "批次总笔数不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal totalAmountBatch;

    /**
     * 单笔发放金额起始值
     */
    @NotNull(message = "单笔发放金额起始值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal singlePaymentAmountStart;

    /**
     * 单笔发放金额结束值
     */
    @NotNull(message = "单笔发放金额结束值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal singlePaymentAmountEnd;

    /**
     * 占比总数
     */
    @NotNull(message = "占比总数不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal proportionTotal;

    /**
     * 离散度
     */
    @NotNull(message = "离散度不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal dispersion;

    /**
     * 单人每年金额
     */
    @NotNull(message = "单人每年金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal singleYearAmount;

    /**
     * 累计发放金额波动起始值
     */
    @NotNull(message = "累计发放金额波动起始值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal waveAmountStart;

    /**
     * 累计发放金额波动结束值
     */
    @NotNull(message = "累计发放金额波动结束值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal waveAmountEnd;

    /**
     * 累计发放金额
     */
    @NotNull(message = "累计发放金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal waveAmount;

    /**
     * 单人连续月份
     */
    @NotNull(message = "单人连续月份不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long singleContinuousMonth;

    /**
     * 发放年龄
     */
    @NotNull(message = "发放年龄不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long issuingAge;

    /**
     * 处理频率[1 每次提交发放 2 每月最后一天]
     */
    @NotNull(message = "处理频率[1 每次提交发放 2 每月最后一天]不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer handleFrequency;

    /**
     * 处理方式[1 发放需审核 2 仅风险预警]
     */
    @NotNull(message = "处理方式[1 发放需审核 2 仅风险预警]不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer handleWay;

    /**
     * 风险原因
     */
    @NotBlank(message = "风险原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String riskReasons;

    /**
     * 是否已删除[0:否，1:是]
     */
    @NotNull(message = "是否已删除[0:否，1:是]不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer isDelete;

    /**
     * 创建者user_id
     */
    @NotNull(message = "创建者user_id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long createUserId;

    /**
     * 更新者user_id
     */
    @NotNull(message = "更新者user_id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long updateUserId;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 单人单月限额
     */
    @NotNull(message = "单人单月限额不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long singleMonthLimit;

    /**
     * 单人月限额
     */
    @NotNull(message = "单人月限额不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long singleMonthLimitAmount;


}
