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

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;

@Schema(description = "管理后台 - 单位工程变量设置创建/更新 Request VO")
@Data
public class QuotaVariableSettingSaveReqVO {

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

    @Schema(description = "费率模式节点ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1002")
    @NotNull(message = "费率模式节点ID不能为空")
    private Long catalogItemId;

    @Schema(description = "类别：division-分部分项/measure-措施项目/other-其他项目/unit_summary-单位汇总", requiredMode = Schema.RequiredMode.REQUIRED, example = "division")
    @NotBlank(message = "类别不能为空")
    private String category;

    @Schema(description = "费用名称", example = "人工费")
    private String name;

    @Schema(description = "费用代号", example = "RGF")
    private String code;

    @Schema(description = "计算基数", example = "{\"formula\":\"DRGF+CLF\",\"variables\":{\"DRGF\":{\"categoryId\":1,\"priceField\":\"tax_excl_base_price\"}}}")
    private Map<String, Object> calcBase;

    @Schema(description = "排序字段", example = "1")
    private Integer sortOrder;

    @Schema(description = "参考节点ID（用于指定插入位置）")
    private Long referenceNodeId;

    @Schema(description = "插入位置：above-在参考节点上方，below-在参考节点下方")
    private String insertPosition;
}
