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 ErpBomDetailSaveReqVO {

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

    @Schema(description = "BOM主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24876")
    @NotEmpty(message = "BOM主键不能为空")
    private String bomId;

    @Schema(description = "ERP物料清单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14731")
    @NotEmpty(message = "ERP物料清单主键不能为空")
    private String erpBomId;

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

    @Schema(description = "子项物料描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "子项物料描述不能为空")
    private String childMaterialDescription;

    @Schema(description = "子项类别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "子项类别不能为空")
    private String category;

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

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

    @Schema(description = "物料标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "物料标识不能为空")
    private String identificationType;

}