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

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

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

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


    private List<BlockObjectListDTO> blockObjectList;

    @NoArgsConstructor
    @Data
    public static class BlockObjectListDTO {

        private String roomName;

        private String cabinetName;

        private String name;

        private String type;

        private String model;

        private String spec;

        @Max(value = 99999, message = "配件宽度不能超过99999")
        @Min(value = 0, message = "配件宽度最小值为0")
        private String width;

        @Max(value = 99999, message = "配件高度不能超过99999")
        @Min(value = 0, message = "配件高度最小值为0")
        private String height;

        @Max(value = 99999, message = "配件厚度不能超过99999")
        @Min(value = 0, message = "配件厚度最小值为0")
        private String thickness;

        private String material;

        private String brand;

        private String factory;

        private String unit;

        private Double num;

        private Boolean isComposite;

        private String remark;

        private Integer objectId;

        private Long imesPartsId;

        private List<Integer> groupIds = new ArrayList<>();

        private GroupDataDTO groupData;

        @NoArgsConstructor
        @Data
        public static class GroupDataDTO {
            @JsonProperty("size")
            private Integer size;
            @JsonProperty("material")
            private String material;
            @JsonProperty("boardName")
            private String boardName;
            @JsonProperty("thickness")
            private Integer thickness;
            @JsonProperty("color")
            private String color;
        }
    }
}
