package com.fzm.mall.server.admin.message.entity.dto;

import com.fzm.mall.server.admin.annotation.CustomType;
import com.fzm.mall.server.admin.constant.MALLGlobalConfig;
import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangp
 * @date 2021/5/6 17:28
 * @description 发送短息
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "SmsSendDTO", description = "发送短息")
public class SmsSendDTO {
    @ApiModelProperty(value = "类别 1：自定义 2：所有用户 3：所有商户", required = true)
    @CustomType(pType = MALLGlobalConfig.ADDRESSEE_TYPE, message = MallResponseError.PARAM_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer addresseeType;

    @ApiModelProperty(value = "收件人", required = true)
    private String addressee;

    @ApiModelProperty(value = "短信模板CODE(id)", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String templateCode;

    @ApiModelProperty(value = "类别 1：立即发送 2：定时发送", required = true)
    @CustomType(pType = MALLGlobalConfig.SEND_TYPE, message = MallResponseError.PARAM_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer sendType;

    @ApiModelProperty(value = "发送时间", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long sendTime;
}
