package com.yhy.module.core.controller.admin.quota.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 定额子目保存 Request VO
 * 
 * @author yhy
 */
@Schema(description = "管理后台 - 定额子目保存 Request VO")
@Data
public class QuotaItemSaveReqVO {

    @Schema(description = "主键ID（更新时必填）", example = "1")
    private Long id;

    @Schema(description = "定额条目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "定额条目ID不能为空")
    private Long catalogItemId;

    @Schema(description = "计量单位", example = "m³")
    private String unit;

    @Schema(description = "定额基价", example = "123.45")
    private BigDecimal basePrice;

    @Schema(description = "合价/金额", example = "1234.50")
    private BigDecimal amount;

    @Schema(description = "扩展属性", example = "{\"labor_cost\":50.00}")
    private Map<String, Object> attributes;

    @Schema(description = "工料机组成列表")
    private List<QuotaResourceSaveReqVO> resources;
}
