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


import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.executor.validation.plate.PlatePlaceHoleValid;
import com.cf.imes.module.executor.validation.plate.PlateTextureValid;
import com.cf.imes.module.executor.validation.plate.PlateTypeValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "管理后台 - 优化生产时新增的小板信息")
public class  OptimizationSavePlateReqVO {


    @Schema(description = "柜体号")
    @NotNull(message = "当前板材没有选择柜体，请选择")
    @Max(value = 0x7fffffffffffffffL,message = "柜体数据错误，请重新进行新增")
    private Long bodyId;


    @Schema(description = "柜体名称")
    private String bodyName;


    @Schema(description = "唯一标识")
    private String blockKey;

    @Schema(description = "房间号")
    @NotNull(message = "当前板材没有选择房间，请选择")
    @Max(value = 0x7fffffffffffffffL,message = "房间数据错误，请重新进行新增")
    private Long roomId;


    @Schema(description = "房间名称")
    private String roomName;


    @Schema(description = "排单ID")
    @NotNull(message = "板材数据错误，请重新进行新增")
    @Max(value = 0x7fffffffffffffffL,message = "板材数据错误，请重新进行新增")
    private Long planId;


    @Schema(description = "订单号")
    @NotNull(message = "当前板材没有选择订单，请选择")
    @Max(value = 0x7fffffffffffffffL,message = "订单数据错误，请重新进行新增")
    private Long orderId;


    @Schema(description = "板名称")
    @NotNull(message = "板材名称不能为空")
    @Length(max = 64, message = "板材名称过长，不得超过 64 个字符")
    private String name;


    @Schema(description = "板类型，0 层板 1 立板 2 背板 3 自增板")
    @PlateTypeValid
    private Integer type;


    @Schema(description = "商品ID-大板的实际ID")
    @NotNull(message = "板材数据错误，请重新进行新增")
    private String goodsId;


    @Schema(description = "纹路类型，0 正纹 1 可翻转 2 反纹")
    @PlateTextureValid
    private Integer texture;


    @Schema(description = "排孔类型，0 正纹 1 反面 2 随意面")
    @PlatePlaceHoleValid
    private Integer placeHole;


    @Schema(description = "宽度")
    @NumberValid(name = "宽度")
    private BigDecimal width;


    @Schema(description = "高度")
    @NumberValid(name = "高度")
    private BigDecimal height;


    @Schema(description = "左封边厚度")
    @NumberValid(name = "左封边")
    private BigDecimal sealLeft;


    @Schema(description = "右封边厚度")
    @NumberValid(name = "右封边")
    private BigDecimal sealRight;


    @Schema(description = "上封边厚度")
    @NumberValid(name = "上封边")
    private BigDecimal sealUp;


    @Schema(description = "下封边厚度")
    @NumberValid(name = "下封边")
    private BigDecimal sealDown;



    @Schema(description = "倍数")
    @Max(value = 10,message = "板材倍数最大为10")
    @Min(value = 1,message = "板材倍数有误，倍数必须大于 0")
    private Integer multiple ;



    @Schema(description = "备注1")
    @Length(max = 127, message = "备注1长度不能超过 127 个字符")
    private String remake1;


    @Schema(description = "备注2")
    @Length(max = 127, message = "备注2长度不能超过 127 个字符")
    private String remake2;

}
