package cn.iocoder.lyzsys.module.tjt.controller.admin.planningguidedetail.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.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 合约规划指导价法明细新增/修改 Request VO")
@Data
public class ProjectPlanningGuideDetailSaveReqVO {

    @Schema(description = "明细 ID", example = "1")
    private Long id;

    @Schema(description = "设计部位", requiredMode = Schema.RequiredMode.REQUIRED, example = "地上部分")
    @NotBlank(message = "设计部位不能为空")
    @Size(max = 20, message = "设计部位长度不能超过 20 个字符")
    private String designPart;

    @Schema(description = "设计内容/设计类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "住宅")
    @NotBlank(message = "设计内容/设计类型不能为空")
    @Size(max = 100, message = "设计内容/设计类型长度不能超过 100 个字符")
    private String buildingType;

    @Schema(description = "设计面积", requiredMode = Schema.RequiredMode.REQUIRED, example = "12000")
    @NotNull(message = "设计面积不能为空")
    @DecimalMin(value = "0", message = "designArea must be >= 0")
    private BigDecimal designArea;

    @Schema(description = "内部指导单价(元/m²)", requiredMode = Schema.RequiredMode.REQUIRED, example = "80")
    @NotNull(message = "内部指导单价不能为空")
    @DecimalMin(value = "0", message = "internalGuidanceUnitPrice must be >= 0")
    private BigDecimal internalGuidanceUnitPrice;

    @Schema(description = "楼栋数/户型数", example = "10")
    private Integer buildingOrUnitCount;

    @Schema(description = "套图系数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0000")
    @NotNull(message = "套图系数不能为空")
    @DecimalMin(value = "0", message = "drawingSetFactor must be >= 0")
    private BigDecimal drawingSetFactor;

    @Schema(description = "规模系数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0000")
    @NotNull(message = "规模系数不能为空")
    @DecimalMin(value = "0", message = "scaleFactor must be >= 0")
    private BigDecimal scaleFactor;

    @Schema(description = "修改系数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0000")
    @NotNull(message = "修改系数不能为空")
    @DecimalMin(value = "0", message = "modificationFactor must be >= 0")
    private BigDecimal modificationFactor;

    @Schema(description = "复杂系数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0000")
    @NotNull(message = "复杂系数不能为空")
    @DecimalMin(value = "0", message = "complexityFactor must be >= 0")
    private BigDecimal complexityFactor;

    @Schema(description = "设计占比", requiredMode = Schema.RequiredMode.REQUIRED, example = "0.5000")
    @NotNull(message = "设计占比不能为空")
    @DecimalMin(value = "0", message = "designRatio must be >= 0")
    @DecimalMax(value = "1", message = "designRatio must be <= 1")
    private BigDecimal designRatio;

    @Schema(description = "排序号", example = "1")
    private Integer sortNo;

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

}
