import { Module, forwardRef } from '@nestjs/common';
import { RestaurantsService } from './providers/restaurants.service';
import { RestaurantsController } from './controllers/restaurants.controller';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Restaurant } from './entities/restaurant.entity';
import { RestRepository } from './repositories/rest.repository';
import { ScheduleRepository } from './repositories/schedule.repository';
import { Schedule } from './entities/schedule.entity';
import { ScheduleService } from './providers/schedule.service';
import { ScheduleController } from './controllers/schedule.controller';
import { RestaurantCrone } from './crone/restaurant.crone';
import { JwtModule } from '@nestjs/jwt';
import { AuthModule } from '../auth/auth.module';

@Module({
  controllers: [RestaurantsController, ScheduleController],
  providers: [RestaurantsService, RestRepository, ScheduleRepository, ScheduleService, RestaurantCrone],
  imports: [MikroOrmModule.forFeature([Restaurant, Schedule]), JwtModule, forwardRef(() => AuthModule)],
  exports: [RestRepository, ScheduleRepository, ScheduleService, RestaurantsService],
})
export class RestaurantsModule { }
