import { Module } from '@nestjs/common';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { CoreModule } from '../core/core.module';
import { GuestService } from './services/guest.service';
import { GuestController } from './api/guest.controller';
import { GuestSubscriber } from './subscribers/guest.subscriber';
import { GuestSchema, GuestNotificationPreferenceSchema } from './entities/guest.entity';
import { GuestModuleRegistration } from './guest.registration';

@Module({
  imports: [
    CoreModule,
    MikroOrmModule.forFeature({
      entities: [GuestSchema, GuestNotificationPreferenceSchema],
    }),
  ],
  providers: [GuestService, GuestSubscriber, GuestModuleRegistration],
  controllers: [GuestController],
  exports: [GuestService],
})
export class GuestModule {}
