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

import com.apobates.forum.core.entity.Board;
import com.apobates.forum.core.entity.Topic;
import java.time.LocalDateTime;

/**
 * 话题移动事件
 * @author xiaofanku
 * @since 20200520
 */
public class TopicMoveEvent {
    private static final long serialVersionUID = -8368153055104486979L;
    //要移动的话题
    private final Topic topic;
    //话题原来的版块
    private final Board protoBoard;
    //移动至的新版块
    private final Board targetBoard;
    //管理员
    private final String managerNickname;
    //操作的日期
    private final LocalDateTime dateTime;
    
    public TopicMoveEvent(Topic moveTopic, Board protoBoard, Board targetBoard, String managerNickname) {
        this.topic = moveTopic;
        this.protoBoard = protoBoard;
        this.targetBoard = targetBoard;
        this.managerNickname = managerNickname;
        this.dateTime = LocalDateTime.now();
    }
    
    public Topic getTopic() {
        return topic;
    }
    
    public Board getProtoBoard() {
        return protoBoard;
    }
    
    public Board getTargetBoard() {
        return targetBoard;
    }
    
    public String getManagerNickname() {
        return managerNickname;
    }
    
    public LocalDateTime getDateTime() {
        return dateTime;
    }
}