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

import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
 * @author Gqr
 * @since 2025/3/3 18:04
 */
@NoArgsConstructor
@Data
public class WebCadDataDoubleRoomTreeReqVO {


    private String name;

    private Integer count;

    @Valid
    private List<ChildrenDTO> children;

    @NoArgsConstructor
    @Data
    public static class ChildrenDTO {

        private String name;

        @NotNull(message = "拆单倍数不能为空")
        @Max(value = 5000, message = "拆单倍数不能超过5000")
        @Min(value = 1, message = "拆单倍数最小值为1")
        private Integer count;

        private List<WebCadDataBlockReqVO> blockList;

        private List<WebCadDataPartsReqVO.BlockObjectListDTO> objList;
    }
}
