package com.zt.plat.module.erp.controller.admin.erp.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

@Schema(description = "管理后台 - ERP物料清单(BOM)新增/修改 Request VO")
@Data
public class ErpBomSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31348")
    private Long id;

    @Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "工厂编码不能为空")
    private String factoryNumber;

    @Schema(description = "顶层物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "顶层物料编码不能为空")
    private String upMaterial;

    @Schema(description = "可选BOM", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "可选BOM不能为空")
    private String useItem;

    @Schema(description = "物料描述")
    private String materialDescription;

    @Schema(description = "基本数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "基本数量不能为空")
    private BigDecimal quantity;

    @Schema(description = "基本单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "基本单位不能为空")
    private String unit;

}