package com.njcn.user.pojo.vo.app;

import cn.hutool.core.lang.RegexPool;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@Schema(description = "管理后台 - 消息记录发送 Request VO")
public class MessageRecordReqVO {

    private String channel;

    @Schema(description = "消息类型", example = "verify_code/order_notify/marketing/system_notify")
    @NotBlank(message = "消息类型不能为空")
    private String messageType;

    @Schema(description = "接收者")
    @NotBlank(message = "接收者不能为空")
    @Pattern(regexp = RegexPool.EMAIL + "|" + RegexPool.MOBILE, message = "必须是有效的邮箱或手机号格式")
    private String receiver;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "消息内容")
    private String content;

    @Schema(description = "模板编码")
    private String templateCode;

    @Schema(description = "模板参数")
    private String templateParams;
}
