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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

@Schema(description = "管理后台 - 定额取费项创建/更新 Request VO")
@Data
public class QuotaFeeItemSaveReqVO {

    @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 = "自定义序号", example = "一")
    private String customCode;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "企业管理费")
    @NotBlank(message = "名称不能为空")
    private String name;

    @Schema(description = "计算基数", example = "{\"formula\":\"除税基价 + 含税基价\",\"variables\":{\"除税基价\":\"tax_excl_base_price\",\"含税基价\":\"tax_incl_base_price\"}}")
    private Map<String, Object> calcBase;

    @Schema(description = "费率代号（%）", example = "15")
    private String rateCode;

    @Schema(description = "代号", example = "QYGLF")
    private String code;

    @Schema(description = "费用归属", example = "间接费")
    private String feeCategory;

    @Schema(description = "基数说明", example = "按除税基价和含税基价之和计算")
    private String baseDescription;

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