package com.sundot.airport.exam.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * <b>功能名：</b>WeakModuleRuleDTO<br>
 * <b>说明：</b> 薄弱项出题规则配置DTO <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
@ApiModel("薄弱项出题规则配置DTO")
public class WeakModuleRuleDTO {

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("业务主键")
    private String wmrId;

    @ApiModelProperty(value = "规则名称", required = true)
    @NotBlank(message = "规则名称不能为空")
    private String wmrName;

    @ApiModelProperty(value = "错题权重（0-1）", required = true, example = "0.60")
    @NotNull(message = "错题权重不能为空")
    @DecimalMin(value = "0.00", message = "错题权重不能小于0")
    @DecimalMax(value = "1.00", message = "错题权重不能大于1")
    private BigDecimal wmrWrongAnswerWeight;

    @ApiModelProperty(value = "巡检问题权重（0-1）", required = true, example = "0.40")
    @NotNull(message = "巡检问题权重不能为空")
    @DecimalMin(value = "0.00", message = "巡检问题权重不能小于0")
    @DecimalMax(value = "1.00", message = "巡检问题权重不能大于1")
    private BigDecimal wmrCheckProblemWeight;

    @ApiModelProperty(value = "第1薄弱模块出题占比（0-1）", required = true, example = "0.40")
    @NotNull(message = "第1薄弱模块占比不能为空")
    @DecimalMin(value = "0.00", message = "第1薄弱模块占比不能小于0")
    @DecimalMax(value = "1.00", message = "第1薄弱模块占比不能大于1")
    private BigDecimal wmrTop1Ratio;

    @ApiModelProperty(value = "第2薄弱模块出题占比（0-1）", required = true, example = "0.15")
    @NotNull(message = "第2薄弱模块占比不能为空")
    @DecimalMin(value = "0.00", message = "第2薄弱模块占比不能小于0")
    @DecimalMax(value = "1.00", message = "第2薄弱模块占比不能大于1")
    private BigDecimal wmrTop2Ratio;

    @ApiModelProperty(value = "第3薄弱模块出题占比（0-1）", required = true, example = "0.05")
    @NotNull(message = "第3薄弱模块占比不能为空")
    @DecimalMin(value = "0.00", message = "第3薄弱模块占比不能小于0")
    @DecimalMax(value = "1.00", message = "第3薄弱模块占比不能大于1")
    private BigDecimal wmrTop3Ratio;

    @ApiModelProperty(value = "统计天数", required = true, example = "91")
    @NotNull(message = "统计天数不能为空")
    @Min(value = 1, message = "统计天数至少为1天")
    @Max(value = 365, message = "统计天数不能超过365天")
    private Integer wmrStatsDays;

    @ApiModelProperty("启用状态（0停用 1启用）")
    private Boolean wmrEnableStatus;

    @ApiModelProperty("备注")
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getWmrId() {
        return wmrId;
    }

    public void setWmrId(String wmrId) {
        this.wmrId = wmrId;
    }

    public String getWmrName() {
        return wmrName;
    }

    public void setWmrName(String wmrName) {
        this.wmrName = wmrName;
    }

    public BigDecimal getWmrWrongAnswerWeight() {
        return wmrWrongAnswerWeight;
    }

    public void setWmrWrongAnswerWeight(BigDecimal wmrWrongAnswerWeight) {
        this.wmrWrongAnswerWeight = wmrWrongAnswerWeight;
    }

    public BigDecimal getWmrCheckProblemWeight() {
        return wmrCheckProblemWeight;
    }

    public void setWmrCheckProblemWeight(BigDecimal wmrCheckProblemWeight) {
        this.wmrCheckProblemWeight = wmrCheckProblemWeight;
    }

    public BigDecimal getWmrTop1Ratio() {
        return wmrTop1Ratio;
    }

    public void setWmrTop1Ratio(BigDecimal wmrTop1Ratio) {
        this.wmrTop1Ratio = wmrTop1Ratio;
    }

    public BigDecimal getWmrTop2Ratio() {
        return wmrTop2Ratio;
    }

    public void setWmrTop2Ratio(BigDecimal wmrTop2Ratio) {
        this.wmrTop2Ratio = wmrTop2Ratio;
    }

    public BigDecimal getWmrTop3Ratio() {
        return wmrTop3Ratio;
    }

    public void setWmrTop3Ratio(BigDecimal wmrTop3Ratio) {
        this.wmrTop3Ratio = wmrTop3Ratio;
    }

    public Integer getWmrStatsDays() {
        return wmrStatsDays;
    }

    public void setWmrStatsDays(Integer wmrStatsDays) {
        this.wmrStatsDays = wmrStatsDays;
    }

    public Boolean getWmrEnableStatus() {
        return wmrEnableStatus;
    }

    public void setWmrEnableStatus(Boolean wmrEnableStatus) {
        this.wmrEnableStatus = wmrEnableStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "WeakModuleRuleDTO{" +
                "id=" + id +
                ", wmrId='" + wmrId + '\'' +
                ", wmrName='" + wmrName + '\'' +
                ", wmrWrongAnswerWeight=" + wmrWrongAnswerWeight +
                ", wmrCheckProblemWeight=" + wmrCheckProblemWeight +
                ", wmrTop1Ratio=" + wmrTop1Ratio +
                ", wmrTop2Ratio=" + wmrTop2Ratio +
                ", wmrTop3Ratio=" + wmrTop3Ratio +
                ", wmrStatsDays=" + wmrStatsDays +
                ", wmrEnableStatus=" + wmrEnableStatus +
                ", remark='" + remark + '\'' +
                '}';
    }
}
