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.Map;

/**
 * 定额工料机组成保存 Request VO
 * 
 * @author yhy
 */
@Schema(description = "管理后台 - 定额工料机组成保存 Request VO")
@Data
public class QuotaResourceSaveReqVO {

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

    @Schema(description = "定额子目ID", example = "1")
    private Long quotaItemId;

    @Schema(description = "资源项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "资源项ID不能为空")
    private Long resourceItemId;

    @Schema(description = "定额消耗量", requiredMode = Schema.RequiredMode.REQUIRED, example = "350.00")
    @NotNull(message = "定额消耗量不能为空")
    private BigDecimal dosage;

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