package com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;

@Schema(description = "管理后台 - 计量单位量与单位关联批量保存 Request VO")
@Data
public class QuantityUnitRelationBatchSaveReqVO {

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

    @Schema(description = "单位关联列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "单位关联列表不能为空")
    private List<UnitRelationItemVO> unitRelations;

    @Schema(description = "单位关联项")
    @Data
    public static class UnitRelationItemVO {

        @Schema(description = "主键ID(新增时为空,更新时必填)", example = "11015")
        private Long id;

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

        @Schema(description = "是否基准单位-标识该维度基准单位")
        private Integer isBse;
    }

}
