import { Module, Global } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { PrismaService, ReferralRelationshipRepository, TeamStatisticsRepository, KafkaService, EventPublisherService, RedisService, LeaderboardCacheService, } from '../infrastructure'; import { REFERRAL_RELATIONSHIP_REPOSITORY, TEAM_STATISTICS_REPOSITORY, } from '../domain'; @Global() @Module({ imports: [ConfigModule], providers: [ PrismaService, KafkaService, RedisService, EventPublisherService, LeaderboardCacheService, { provide: REFERRAL_RELATIONSHIP_REPOSITORY, useClass: ReferralRelationshipRepository, }, { provide: TEAM_STATISTICS_REPOSITORY, useClass: TeamStatisticsRepository, }, ], exports: [ PrismaService, KafkaService, RedisService, EventPublisherService, LeaderboardCacheService, REFERRAL_RELATIONSHIP_REPOSITORY, TEAM_STATISTICS_REPOSITORY, ], }) export class InfrastructureModule {}