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

import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.executor.validation.manage.common.ValidCommonStatus;
import com.cf.imes.module.executor.validation.manage.placeStyle.ValidPlaceStyle;
import com.cf.imes.module.executor.validation.manage.type.ValidTypeField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 生产单余料板表 Request VO")
@Data
public class RemainPlateSaveReqVO {

    @Schema(description = "余料板 ID")
    private Long id;

    @Schema(description = "组织id", example = "1")
    private Long organId;

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

    @Schema(description = "初始排单 ID")
    private Long initPlanId;

    @Schema(description = "余料板状态，0未使用，1已使用", example = "1")
    @ValidCommonStatus
    private Integer status;

    @Schema(description = "是否为开料添加，0否，1是", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "是否为开料添加，0否，1是")
    private Boolean isCutting;

    @Schema(description = "使用类型，0核销，1排单，2补板", example = "1")
    @ValidTypeField
    private Integer useType;

    @Schema(description = "商品 ID", example = "7425")
    @Size(max = 32, message = "商品ID长度不能超过32个字符")
    private String goodsId;

    @Schema(description = "商品名", example = "晨丰")
    @Size(max = 255, message = "商品名长度不能超过255个字符")
    private String name;

    @Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "材料不能为空")
    @Size(max = 50, message = "材料长度不能超过50个字符")
    private String material;

    @Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "颜色不能为空")
    @Size(max = 50, message = "颜色长度不能超过50个字符")
    private String color;

    @Schema(description = "纹理 有 无", requiredMode = Schema.RequiredMode.REQUIRED)
    private Boolean texture;

    @Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "宽度不能为空")
    @NumberValid(name = "宽度")
    private BigDecimal width;

    @Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "长度不能为空")
    @NumberValid(name = "长度")
    private BigDecimal length;

    @Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "厚度不能为空")
    @NumberValid(name = "厚度")
    private BigDecimal thickness;

    @Schema(description = "品牌")
    @Size(max = 50, message = "品牌长度不能超过50个字符")
    private String brand;

    @Schema(description = "放置样式，0正面，1正面右转，2正面后转，3正面左转，4反面，5反面右转，6反面后转，7反面左转", example = "0")
    @ValidPlaceStyle
    private Integer placeStyle;

    @Schema(description = "仓库名")
    @Size(max = 64, message = "仓库名长度不能超过64个字符")
    private String store;

    @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
    @NotNull(message = "数量不能为空")
    private Integer count;

    @Schema(description = "备注", example = "随便")
    @Size(max = 255, message = "备注长度不能超过255个字符")
    private String remark;

    @Schema(description = "轮廊数据，Json 串", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
    private String outLineJson;

}