package top.continew.admin.business.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import top.continew.starter.extension.crud.model.req.BaseReq;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 免费额度配置请求信息
 *
 * @author jiay
 * @since 2025/11/17
 */
@Data
@Schema(description = "免费额度配置请求信息")
public class FreeQuotaConfigReq extends BaseReq {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 类别编码
     */
    @Schema(description = "类别编码", example = "TOKEN")
    private String categoryCode;

    /**
     * 类别名称
     */
    @Schema(description = "类别名称", example = "大模型")
    @NotBlank(message = "类别名称不能为空")
    private String categoryName;

    /**
     * 单位
     */
    @Schema(description = "单位", example = "token")
    @NotBlank(message = "单位不能为空")
    private String unit;

    /**
     * 额度
     */
    @Schema(description = "额度", example = "500000")
    @NotNull(message = "额度不能为空")
    private BigDecimal quota;

    /**
     * 计费类型
     */
    @Schema(description = "计费类型", example = "0")
    private Integer chargeType;

    /**
     * 账户类型 1:次数 2:点数
     */
    @Schema(description = "账户类型", example = "1")
    @NotNull(message = "账户类型不能为空")
    private Integer type;

    /**
     * 描述
     */
    @Schema(description = "描述", example = "大模型对话额度")
    private String description;

    /**
     * 排序
     */
    @Schema(description = "排序", example = "1")
    private Integer sort;

    /**
     * 是否启用
     */
    @Schema(description = "是否启用", example = "true")
    private Boolean isEnabled;
}
