package cn.iocoder.lyzsys.module.tjt.controller.admin.outputsplit.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 java.math.BigDecimal;

@Schema(description = "管理后台 - 页面4拆分比例新增/修改 Request VO")
@Data
public class ProjectOutputSplitSaveReqVO {

    @Schema(description = "合约规划 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "合约规划 ID 不能为空")
    private Long planningId;

    @Schema(description = "项目经理/工程负责人合并比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.0550")
    @NotNull(message = "项目经理/工程负责人合并比例不能为空")
    @DecimalMin(value = "0.0000", message = "projectLeadRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "projectLeadRatio must be <= 1")
    private BigDecimal projectLeadRatio;

    @Schema(description = "专业所比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.9500")
    @NotNull(message = "专业所比例不能为空")
    @DecimalMin(value = "0.0000", message = "officeRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "officeRatio must be <= 1")
    private BigDecimal officeRatio;

    @Schema(description = "建筑专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.5000")
    @NotNull(message = "建筑专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "archRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "archRatio must be <= 1")
    private BigDecimal archRatio;

    @Schema(description = "装修专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.0000")
    @NotNull(message = "装修专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "decorRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "decorRatio must be <= 1")
    private BigDecimal decorRatio;

    @Schema(description = "结构专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.2000")
    @NotNull(message = "结构专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "structRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "structRatio must be <= 1")
    private BigDecimal structRatio;

    @Schema(description = "水专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.1000")
    @NotNull(message = "水专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "waterRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "waterRatio must be <= 1")
    private BigDecimal waterRatio;

    @Schema(description = "电气专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.1000")
    @NotNull(message = "电气专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "elecRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "elecRatio must be <= 1")
    private BigDecimal elecRatio;

    @Schema(description = "暖通专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.0500")
    @NotNull(message = "暖通专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "hvacRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "hvacRatio must be <= 1")
    private BigDecimal hvacRatio;

    @Schema(description = "数字化设计专业比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.0500")
    @NotNull(message = "数字化设计专业比例不能为空")
    @DecimalMin(value = "0.0000", message = "digitalRatio must be >= 0")
    @DecimalMax(value = "1.0000", message = "digitalRatio must be <= 1")
    private BigDecimal digitalRatio;

}
