import { Module, forwardRef } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { RewardApplicationService } from './services/reward-application.service';
import { RewardExpirationScheduler } from './schedulers/reward-expiration.scheduler';
import { DomainModule } from '../domain/domain.module';
import { InfrastructureModule } from '../infrastructure/infrastructure.module';

@Module({
  imports: [
    ScheduleModule.forRoot(),
    DomainModule,
    forwardRef(() => InfrastructureModule),
  ],
  providers: [
    RewardApplicationService,
    RewardExpirationScheduler,
  ],
  exports: [RewardApplicationService],
})
export class ApplicationModule {}
