package com.cf.imes.module.executor.controller.admin.plan.vo;

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

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author Beal
 */
@Data
public class SavePlanPlateList {


    @Schema(description = "混单的配置项",requiredMode = Schema.RequiredMode.REQUIRED)
    private MixConfig mixConfig;


    @Schema(description = "排单ID")
    private Long planId;


    @Schema(description = "小板的信息列表",requiredMode = Schema.RequiredMode.REQUIRED)
    @Valid
    private List<SavePlanPlateList.PlateItemList> plateItemList;


    @Schema(description = "大板的信息列表",requiredMode = Schema.RequiredMode.REQUIRED)
    @Valid
    private List<SavePlanPlateList.GoodsItemList> goodsItemList;




    @Data
    public static class PlateItemList {

        @Schema(description = "订单id")
        @NotNull(message = "订单数据错误，请检查订单数据或重新导入，排单创建失败")
        private Long plateId;

        @Schema(description = "订单的商品id")
        @NotNull(message = "订单数据错误，请检查订单数据或重新导入，排单创建失败")
        private Long id;

        @Schema(description = "订单id")
        @NotNull(message = "订单数据错误，请检查订单数据或重新导入，排单创建失败")
        private Long orderId;


    }


    @Data
    public static class GoodsItemList {


        @Schema(description = "订单的商品id")
        @NotNull(message = "订单数据错误，请检查订单数据或重新导入，排单创建失败")
        private Long id;


        @Schema(description = "板材库大板id-这个在新版还是需要的")
        @NotNull(message = "订单数据错误，请检查订单数据或重新导入，排单创建失败")
        private String goodsId;


        @Schema(description = "大板的材质")
        private String material;


        @Schema(description = "大板的厚度")
        private BigDecimal thickness;


        @Schema(description = "大板的颜色")
        private String color;


        @Schema(description = "大板的品牌")
        private String brand;

        @Schema(description = "纹理")
        private Boolean texture;

    }

}

