package cn.axzo.msg.center.notices.http.api.request;

import cn.azxo.framework.common.annotation.ValidNumberValue;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 批量发送短信请求
 *
 * @author zhaoyong
 * @see SendBatchMessageRequest
 * @since 2021-08-05 12:50
 */
@Data
public class SendBatchMessageRequest {

  /**
   * 请求号
   */
  @NotBlank(message = "request no must not be null")
  private String requestNo;

  /**
   *  应用接入码
   */
  @NotBlank(message = "app code must not be null")
  private String appCode;

  /**
   * 消息模板号
   */
  @NotBlank(message = "templateNo must not be null")
  private String templateNo;

  /**
   * 发送类型
   *
   * 1:实时;2:非实时
   *
   */
  @NotNull(message = "sendType must not be null")
  @ValidNumberValue(value = {1, 2}, message = "sendType must be in {value}")
  private Integer sendType;

  /**
   * 消息内容
   */
  @Valid
  @NotNull(message = "smsContents must not be null")
  private List<SmsContent> smsContents;

}
