import { Module } from '@nestjs/common';
import { ReviewService } from './providers/review.service';
import { ReviewController } from './controllers/review.controller';
import { ReviewRepository } from './repositories/review.repository';
import { FoodRatingCronService } from './providers/food-rating-cron.service';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Review } from './entities/review.entity';
import { FoodModule } from '../foods/food.module';
import { UserModule } from '../users/user.module';
import { AuthModule } from '../auth/auth.module';
import { JwtModule } from '@nestjs/jwt';
import { ReviewListeners } from './listeners/review.listeners';
import { AdminModule } from '../admin/admin.module';
import { NotificationsModule } from '../notifications/notifications.module';

@Module({
  imports: [MikroOrmModule.forFeature([Review]), FoodModule, UserModule, AuthModule, JwtModule, AdminModule, NotificationsModule],
  controllers: [ReviewController],
  providers: [ReviewService, ReviewRepository, FoodRatingCronService, ReviewListeners],
  exports: [ReviewRepository],
})
export class ReviewModule {}
