package com.yhy.module.core.controller.admin.quota.vo;

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

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

@Schema(description = "管理后台 - 动态合并工料机配置 VO")
@Data
public class QuotaAdjustmentMergeResourceVO {

    @Schema(description = "工料机ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @NotNull(message = "工料机ID不能为空")
    private Long resourceId;

    @Schema(description = "工料机编码", example = "C001")
    private String resourceCode;

    @Schema(description = "工料机名称", example = "水泥 P.O 42.5")
    private String resourceName;

    @Schema(description = "系数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.2")
    @NotNull(message = "系数不能为空")
    private BigDecimal coefficient;

    @Schema(description = "最小值", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "最小值不能为空")
    private BigDecimal minValue;

    @Schema(description = "最大值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
    @NotNull(message = "最大值不能为空")
    private BigDecimal maxValue;

    @Schema(description = "分母值", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @NotNull(message = "分母值不能为空")
    private BigDecimal denominator;

    @Schema(description = "基础值", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
    @NotNull(message = "基础值不能为空")
    private BigDecimal baseValue;

    @Schema(description = "取值规则", requiredMode = Schema.RequiredMode.REQUIRED, example = "round_up")
    @NotNull(message = "取值规则不能为空")
    private String roundingRule;
}
