package com.cico.nest.lcdp.boot.core.system.mq.message.sms;

import com.cico.nest.lcdp.framework.common.core.KeyValue;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * 短信发送消息
 *
 * @author zws
 */
@Data
public class SmsSendMessage {

    /**
     * 短信日志编号
     */
    @NotNull(message = "短信日志编号不能为空")
    private Long logId;
    /**
     * 手机号
     */
    @NotNull(message = "手机号不能为空")
    private String mobile;
    /**
     * 短信渠道编号
     */
    @NotNull(message = "短信渠道编号不能为空")
    private Long channelId;
    /**
     * 短信 API 的模板编号
     */
    @NotNull(message = "短信 API 的模板编号不能为空")
    private String apiTemplateId;
    /**
     * 短信模板参数
     */
    private List<KeyValue<String, Object>> templateParams;

    public SmsSendMessage setLogId(Long logId) {
        this.logId = logId;
        return this;
    }

    public SmsSendMessage setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public SmsSendMessage setChannelId(Long channelId) {
        this.channelId = channelId;
        return this;
    }

    public SmsSendMessage setApiTemplateId(String apiTemplateId) {
        this.apiTemplateId = apiTemplateId;
        return this;
    }

    public SmsSendMessage setTemplateParams(List<KeyValue<String, Object>> templateParams) {
        this.templateParams = templateParams;
        return this;
    }
}
