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

import com.apobates.forum.core.entity.Board;
import com.apobates.forum.core.entity.BoardConfig;

/**
 * 版块创建事件
 * @author xiaofanku
 * @since 20200520
 */
public class BoardCreateEvent {
    private static final long serialVersionUID = -2855321240838877119L;
    private final Board board;
    private final BoardConfig boardConfig;
    
    public BoardCreateEvent(Board board, BoardConfig boardConfig) {
        this.board = board;
        this.boardConfig = boardConfig;
    }
    
    public BoardCreateEvent(Board board) {
        this.board = board;
        this.boardConfig = BoardConfig.defaultConfig(board.getId());
    }
    
    public Board getBoard() {
        return board;
    }
    
    public BoardConfig getBoardConfig() {
        return boardConfig;
    }
}