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;

/**
 * 创建或修改计费规则信息
 *
 * @author jiay
 * @since 2025/11/14
 */
@Data
@Schema(description = "创建或修改计费规则信息")
public class BillingRuleReq extends BaseReq {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 平台名称
     */
    @Schema(description = "平台名称", example = "AI绘画")
    @NotBlank(message = "平台名称不能为空")
    private String platformName;

    /**
     * 账户类型
     */
    @Schema(description = "账户类型", example = "图片")
    private String type;

    /**
     * 平台ID
     */
    @Schema(description = "平台ID", example = "10000")
    @NotNull(message = "平台ID不能为空")
    private Long platformId;

    /**
     * 平台编码
     */
    @Schema(description = "平台编码", example = "KEXUE_CHAT")
    private String platformCode;

    /**
     * 扣费编码
     */
    @Schema(description = "扣费编码", example = "C0001")
    @NotBlank(message = "扣费编码不能为空")
    private String chargeCode;

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

    /**
     * 模型名称
     */
    @Schema(description = "模型名称", example = "flux")
    private String modelName;

    /**
     * 主账户单价（分/次/整数量）
     */
    @Schema(description = "主账户单价（分/次/整数量）", example = "13")
    private Long price;

    /**
     * 子账户单价（次/个/数量）
     */
    @Schema(description = "子账户单价（次/个/数量）", example = "1")
    private Long subAccountPrice;

    /**
     * 计费单位
     */
    @Schema(description = "计费单位", example = "张")
    private String unit;

    /**
     * 备注
     */
    @Schema(description = "备注", example = "")
    private String remark;

    /**
     * 是否启用（0:禁用 1:启用）
     */
    @Schema(description = "是否启用", example = "1")
    private Integer enabled;
}
