54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import { ContainerModule } from 'inversify';
|
|
import { LeagueService } from '../../services/leagues/LeagueService';
|
|
import { LeagueSettingsService } from '../../services/leagues/LeagueSettingsService';
|
|
import { LeagueStewardingService } from '../../services/leagues/LeagueStewardingService';
|
|
import { LeagueWalletService } from '../../services/leagues/LeagueWalletService';
|
|
import { LeagueMembershipService } from '../../services/leagues/LeagueMembershipService';
|
|
|
|
import {
|
|
LEAGUE_SERVICE_TOKEN,
|
|
LEAGUE_SETTINGS_SERVICE_TOKEN,
|
|
LEAGUE_STEWARDING_SERVICE_TOKEN,
|
|
LEAGUE_WALLET_SERVICE_TOKEN,
|
|
LEAGUE_MEMBERSHIP_SERVICE_TOKEN
|
|
} from '../tokens';
|
|
|
|
export const LeagueModule = new ContainerModule((options) => {
|
|
const bind = options.bind;
|
|
|
|
// League Service
|
|
bind<LeagueService>(LEAGUE_SERVICE_TOKEN)
|
|
.toDynamicValue(() => {
|
|
return new LeagueService();
|
|
})
|
|
.inSingletonScope();
|
|
|
|
// League Settings Service
|
|
bind<LeagueSettingsService>(LEAGUE_SETTINGS_SERVICE_TOKEN)
|
|
.toDynamicValue(() => {
|
|
return new LeagueSettingsService();
|
|
})
|
|
.inSingletonScope();
|
|
|
|
// League Stewarding Service
|
|
bind<LeagueStewardingService>(LEAGUE_STEWARDING_SERVICE_TOKEN)
|
|
.toDynamicValue(() => {
|
|
return new LeagueStewardingService();
|
|
})
|
|
.inSingletonScope();
|
|
|
|
// League Wallet Service
|
|
bind<LeagueWalletService>(LEAGUE_WALLET_SERVICE_TOKEN)
|
|
.toDynamicValue(() => {
|
|
return new LeagueWalletService();
|
|
})
|
|
.inSingletonScope();
|
|
|
|
// League Membership Service
|
|
bind<LeagueMembershipService>(LEAGUE_MEMBERSHIP_SERVICE_TOKEN)
|
|
.toDynamicValue(() => {
|
|
return new LeagueMembershipService();
|
|
})
|
|
.inSingletonScope();
|
|
});
|