package com.njcn.msgpush.module.push.controller.admin.blacklist.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-12
 */
@Data
@Schema(description = "管理后台 - 黑名单 Request VO")
public class BlacklistReqVO extends PageParam {

    @Schema(description = "主键 ID", example = "123444")
    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 = "黑名单目标：手机号/邮箱/设备 Token", example = "15601691000")
    @NotBlank(message = "黑名单目标不能为空")
    private String target;

    @Schema(description = "加入原因：用户投诉/无效号码/频繁退订等", example = "用户投诉")
    private String reason;

    @Schema(description = "操作来源：manual/auto/import", example = "manual")
    @InEnum(value = com.njcn.msgpush.module.push.enums.BlacklistSourceEnum.class, message = "操作来源必须是 {value}")
    private String source;

    @Schema(description = "过期时间：-1=永久，时间戳=到期时间", example = "15601691000")
    @NotNull(message = "过期时间不能为空")
    @Min(value = -1L, message = "过期时间不能小于 -1")
    private Long expireTime;

    @Schema(description = "备注", example = "备注信息")
    private String remark;
}
