package cn.iocoder.lyzsys.module.tjt.controller.admin.yearkvalue.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 年度 K 值新增/修改 Request VO")
@Data
public class YearKValueSaveReqVO {

    @Schema(description = "主键 ID", example = "1")
    private Long id;

    @Schema(description = "年度", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026")
    @NotNull(message = "年度不能为空")
    private Integer kYear;

    @Schema(description = "K 值", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.4000")
    @NotNull(message = "K 值不能为空")
    @DecimalMin(value = "0.0000", message = "K 值不能小于 0%")
    @DecimalMax(value = "1.0000", message = "K 值不能大于 100%")
    private BigDecimal kValue;

    @Schema(description = "备注")
    @Size(max = 255, message = "备注长度不能超过 255 个字符")
    private String remark;

    @Schema(description = "是否启用", example = "true")
    private Boolean enabledFlag;

}
