package com.sqx.modules.errand.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 短信模板
 */
@Data
@ApiModel("SmsTemplateDTO")
public class SmsTemplateDTO {
    @ApiModelProperty("id，修改时不能为空")
    private Long id;

    @ApiModelProperty(value = "模板名称", required = true)
    @NotBlank(message = "模板名称不能为空")
    private String templateName;

    @ApiModelProperty(value = "模板内容 支持自定义变量", required = true)
    @NotBlank(message = "模板内容不能为空")
    private String templateContent;

    @ApiModelProperty(value = "第三方平台模板code")
    private String platformCode;

    @ApiModelProperty(value = "第三方平台类型 1腾讯", required = true)
    @NotBlank(message = "第三方平台类型不能为空")
    @Pattern(regexp = "(1)", message = "第三方平台类型目前只支持腾讯 1")
    private String platformType;

    @ApiModelProperty(value = "状态 1启用 0禁用", required = true)
    @NotBlank(message = "状态不能为空")
    @Pattern(regexp = "(1|0)", message = "状态只能为1或0")
    private String status;
}
