package cn.iocoder.yudao.module.mes.controller.admin.bom.vo;

import cn.iocoder.yudao.module.mes.dal.dataobject.bom.BomDetailDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Schema(description = "管理后台 - 产品BOM新增/修改 Request VO")
@Data
public class BomSaveReqVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23849")
    private Long id;

    @Schema(description = "BOM编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "BOM编码不能为空")
    private String code;

    @Schema(description = "BOM版本", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "BOM版本不能为空")
    private String version;

    @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5633")
    @NotNull(message = "产品ID不能为空")
    private Long productId;

    @Schema(description = "单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24261")
    @NotNull(message = "单位ID不能为空")
    private Long unitId;

    @Schema(description = "成品率%")
    private BigDecimal yieldRate;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)

    private Boolean isEnable;

    @Schema(description = "产品BOM明细列表")
    private List<BomDetailDO> bomDetails;

}