package com.ym.mec.biz.event;

import com.ym.mec.biz.dal.enums.MessageTypeEnum;
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
import org.springframework.context.ApplicationEvent;

import java.util.Map;

public class SendMessageChangeEvent extends ApplicationEvent {

    //消息模板
    private MessageTypeEnum msgTemplate;

    //极光推送目标客户端
    private String pushType;

    //跳转地址
    private String url;

    //参数
    private Object[] args;

    //发送模式（SMS,PUSH,EMAIL）
    private MessageSenderPluginContext.MessageSender messageSender;

    //目标用户
    private Map<Integer, String> receivers;

    public SendMessageChangeEvent(Object source, MessageSenderPluginContext.MessageSender messageSender,
                                  MessageTypeEnum msgTemplate,
                                  Map<Integer, String> receivers,
                                  String url,
                                  String pushType,
                                  Object... args) {
        super(source);
        this.msgTemplate = msgTemplate;
        this.pushType = pushType;
        this.url = url;
        this.args = args;
        this.messageSender = messageSender;
        this.receivers = receivers;
    }

    public MessageTypeEnum getMsgTemplate() {
        return msgTemplate;
    }

    public void setMsgTemplate(MessageTypeEnum msgTemplate) {
        this.msgTemplate = msgTemplate;
    }

    public String getPushType() {
        return pushType;
    }

    public void setPushType(String pushType) {
        this.pushType = pushType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object[] getArgs() {
        return args;
    }

    public void setArgs(Object[] args) {
        this.args = args;
    }

    public MessageSenderPluginContext.MessageSender getMessageSender() {
        return messageSender;
    }

    public void setMessageSender(MessageSenderPluginContext.MessageSender messageSender) {
        this.messageSender = messageSender;
    }

    public Map<Integer, String> getReceivers() {
        return receivers;
    }

    public void setReceivers(Map<Integer, String> receivers) {
        this.receivers = receivers;
    }
}
