package com.qmth.boot.core.sms.model;

import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;

@Validated
public class SmsSendRequest {

    @NotNull(message = "phoneNumber不能为空")
    private String phoneNumber;

    @NotNull(message = "signName不能为空")
    private String signName;

    @NotNull(message = "templateCode不能为空")
    private String templateCode;

    private Map<String, Object> templateParam;

    public SmsSendRequest() {
        this.templateParam = new HashMap<>();
    }

    public void addParam(String name, Object value) {
        this.templateParam.put(name, value);
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getSignName() {
        return signName;
    }

    public void setSignName(String signName) {
        this.signName = signName;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public Map<String, Object> getTemplateParam() {
        return templateParam;
    }

    public void setTemplateParam(Map<String, Object> templateParam) {
        this.templateParam = templateParam;
    }
}
