package com.njcn.msgpush.module.push.controller.admin.ratelimit.VO;

import com.njcn.msgpush.framework.common.pojo.PageParam;
import com.njcn.msgpush.framework.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author caozehui
 * @data 2026-03-13
 */
@Data
@Schema(description = "管理后台 - 限流配置 Request VO")
public class RateLimitConfigReqVO extends PageParam {
    @Schema(description = "主键 ID")
    private Long id;

    @Schema(description = "渠道类型：sms/email/app", example = "sms")
    @InEnum(value = com.njcn.msgpush.module.push.enums.ChannelTypeEnum.class, message = "渠道类型必须是 {value}")
    private String channel;

    @Schema(description = "来源系统", example = "NPQS-9000")
    @NotBlank(message = "来源系统不能为空")
    private String appName;

    @Schema(description = "单接收者每日上限", example = "100")
    @NotNull(message = "单接收者每日上限不能为空")
    @Min(value = 1L, message = "单接收者每日上限不能小于 1")
    private Integer dailyLimit;

    @Schema(description = "是否启用：0-否 1-是", example = "1")
    @NotNull(message = "是否启用不能为空")
    private Boolean enabled;
}
