package com.cf.imes.module.plan.controller.admin.orderImport.webcad.vo;

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

import jakarta.validation.Valid;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import java.util.List;

/**
 * @author Gqr
 * @since 2025/3/3 17:57
 */
@NoArgsConstructor
@Schema(description = "管理后台 - webcad加工组信息 - RequestVO")
@Data
public class WebCadDataProcessGroupReqVO {


    private String type;

    @Valid
    private List<ProjectsDTO> projects;

    @NoArgsConstructor
    @Data
    public static class ProjectsDTO {

        private String projName;

        private List<Integer> brIds;

        private List<Integer> objIds;

        @Valid
        private BoxSizeDTO boxSize;

        private Integer groupID;

        @NoArgsConstructor
        @Data
        public static class BoxSizeDTO {

            @Max(value = 99999, message = "加工组涉及柜体宽度不能超过99999")
            @Min(value = 0, message = "加工组涉及柜体宽度最小值为0")
            private Double width;

            @Max(value = 99999, message = "加工组涉及柜体高度不能超过99999")
            @Min(value = 0, message = "加工组涉及柜体高度最小值为0")
            private Double height;

            @Max(value = 99999, message = "加工组涉及柜体深度不能超过99999")
            @Min(value = 0, message = "加工组涉及柜体深度最小值为0")
            private Double depth;
        }
    }
}
