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

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Gqr
 * @since 2025/3/3 18:06
 */
@NoArgsConstructor
@Data
public class WebCadDataProcessConfigReqVO {

    private InfoDTO info;
    private HolesDTO holes;
    private List<Modeling2DDTO> modeling2D;
    private List<?> modeling3D;
    private List<SealingDTO> sealing;
    private OutlineDTO outline;
    private List<ModelingDTO> modeling;
    private OriginOutlinDTO originOutlin;
    private List<ConfigDTO> config;

    @NoArgsConstructor
    @Data
    public static class InfoDTO {
        private Integer id;
        private String name;
        private String roomName;
        private String cabinetName;
        private String material;
        private String boardName;
        private String color;
        private Integer lines;
        private String drillType;
        private Integer thickness;
        private String spliteHeight;
        private String spliteThickness;
        private String spliteWidth;
        private Boolean isRect;
        private List<List<String>> remarks;
        private Double kaiLiaoWidth;
        private Double kaiLiaoHeight;
        private Integer openDir;
    }

    @NoArgsConstructor
    @Data
    public static class HolesDTO {
        private List<FrontBackHolesDTO> frontBackHoles;
        private List<SideHolesDTO> sideHoles;

        @NoArgsConstructor
        @Data
        public static class FrontBackHolesDTO {
            private Integer type;
            private PositionDTO position;
            private Double radius;
            private Double depth;
            private Integer face;
            private Double angle;
            private String name;
            private String goodsId;

            @NoArgsConstructor
            @Data
            public static class PositionDTO {
                private Double x;
                private Double y;
                private Double z;
            }
        }

        @NoArgsConstructor
        @Data
        public static class SideHolesDTO {
            private Integer type;
            private PositionDTO position;
            private EndPtDTO endPt;
            private Integer radius;
            private Double depth;
            private Integer face;
            private String name;
            private String goodsId;

            @NoArgsConstructor
            @Data
            public static class PositionDTO {
                private Double x;
                private Double y;
                private Integer z;
            }

            @NoArgsConstructor
            @Data
            public static class EndPtDTO {
                private Double x;
                private Double y;
                private Integer z;
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class OutlineDTO {
        private List<PtsDTO> pts;
        private List<Integer> buls;

        @NoArgsConstructor
        @Data
        public static class PtsDTO {
            private Double x;
            private Integer y;
        }
    }

    @NoArgsConstructor
    @Data
    public static class OriginOutlinDTO {
        private List<PtsDTO> pts;
        private List<Integer> buls;

        @NoArgsConstructor
        @Data
        public static class PtsDTO {
            private Double x;
            private Integer y;
        }
    }

    @NoArgsConstructor
    @Data
    public static class Modeling2DDTO {
        private PathDTO path;
        private Integer dir;
        private List<ItemsDTO> items;

        @NoArgsConstructor
        @Data
        public static class PathDTO {
            private List<PtsDTO> pts;
            private List<Integer> buls;

            @NoArgsConstructor
            @Data
            public static class PtsDTO {
                private Double x;
                private Double y;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ItemsDTO {
            private Integer depth;
            private Integer offset;
            private KnifeDTO knife;
            private String depthExpr;

            @NoArgsConstructor
            @Data
            public static class KnifeDTO {
                private String id;
                private Integer radius;
                private Double angle;
                private String name;
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class SealingDTO {
        private Double length;
        private Integer size;
        private String sealColor;
    }

    @NoArgsConstructor
    @Data
    public static class ModelingDTO {
        private List<FeedingDTO> feeding;
        private Integer thickness;
        private Integer dir;
        private Integer knifeRadius;
        private OriginDTO origin;

        @NoArgsConstructor
        @Data
        public static class OriginDTO {
            private OutlineDTO outline;
            private List<?> holes;
            private Integer addLen;
            private Integer addWidth;
            private Integer addDepth;

            @NoArgsConstructor
            @Data
            public static class OutlineDTO {
                private List<PtsDTO> pts;
                private List<Integer> buls;

                @NoArgsConstructor
                @Data
                public static class PtsDTO {
                    private Double x;
                    private Double y;
                }
            }
        }

        @NoArgsConstructor
        @Data
        public static class FeedingDTO {
            private List<PtsDTO> pts;
            private List<Integer> buls;

            @NoArgsConstructor
            @Data
            public static class PtsDTO {
                private Double x;
                private Double y;
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class ConfigDTO {
        private Integer thickness;
        private Integer width;
        private Integer height;
        private String color;
        private String material;
        private String name;
        private String goodsId;
        private String id;
    }
}
