package com.alttd.altitudeweb.setup;

import com.alttd.altitudeweb.database.Databases;
import com.alttd.altitudeweb.database.votingplugin.VotingPluginUsersMapper;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class InitializeVotingPlugin {

    protected static void init() {
        log.info("Initializing VotingPlugin");
        Connection.getConnection(Databases.VOTING_PLUGIN, (configuration) -> {
            configuration.addMapper(VotingPluginUsersMapper.class);
        }).join();
        log.debug("Initialized VotingPlugin");
    }
}
