package com.apobates.forum.core.impl.event;

import com.apobates.forum.core.entity.Topic;
import com.apobates.forum.core.entity.TopicConfig;
import com.apobates.forum.core.entity.TopicStats;
import com.apobates.forum.core.entity.TopicTag;
import java.util.Set;

/**
 * 话题发布事件
 * @author xiaofanku
 * @since 20200520
 */
public class TopicPublishEvent{
    private static final long serialVersionUID = 5439566453466799789L;
    private final Topic topic;
    private final TopicConfig config;
    private final TopicStats stats;
    private final String userAgent;
    private final Set<TopicTag> tages;

    public TopicPublishEvent(Topic topic, TopicConfig config, TopicStats stats, Set<TopicTag> tages, String userAgent) {
        this.topic = topic;
        this.config = config;
        this.stats = stats;
        this.tages = tages;
        this.userAgent = userAgent;
    }

    public TopicConfig getConfig() {
        return config;
    }

    public TopicStats getStats() {
        return stats;
    }

    public Set<TopicTag> getTages() {
        return tages;
    }

    public Topic getTopic() {
        return topic;
    }
    
    public String getUserAgent() {
        return userAgent;
    }
}