package com.apobates.forum.core.entity.proxy;

import com.apobates.forum.core.entity.Board;
import com.apobates.forum.core.entity.BoardGroup;
import com.apobates.forum.core.entity.BoardModerator;
import com.apobates.forum.event.elderly.ForumActionEnum;
import com.apobates.forum.utils.lang.ForumReplicable;
import java.util.List;
import java.util.function.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author xiaofanku
 * @since 20200514
 */
public final class BoardModeratorReplica extends BoardModerator implements ForumReplicable<BoardModerator, BoardModeratorReplica>{
    private static final long serialVersionUID = 1L;
    //版主权限容器
    private List<ForumActionEnum> actions;
    private BoardGroup volumes;
    private Board board;
    private final static Logger logger = LoggerFactory.getLogger(BoardModeratorReplica.class);
    public static Function<BoardModerator, BoardModeratorReplica> copyModerator = (BoardModerator moderator) ->{
        return ForumReplicable.replica(moderator, BoardModeratorReplica.class).orElseGet(BoardModeratorReplica::new);
    };
    
    public BoardModeratorReplica(){
        super();
    }
    
    public List<ForumActionEnum> getActions() {
        return actions;
    }
    
    public BoardGroup getVolumes() {
        return volumes;
    }
    public Board getBoard() {
        return board;
    }
    public void setVolumes(BoardGroup volumes){
        this.volumes = volumes;
    }
    public void setBoard(Board board){
        this.board = board;
    }
    public void setActions(List<ForumActionEnum> actions){
        this.actions = actions;
    }
}