import { Module } from '@nestjs/common';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { CoreModule } from '../core/core.module';
import { GiftService } from './services/gift.service';
import { GiftController } from './api/gift.controller';
import { GiftSubscriber } from './subscribers/gift.subscriber';
import { GiftSchema, GiftContributionSchema } from './entities/gift.entity';
import { GiftModuleRegistration } from './gift.registration';

@Module({
  imports: [
    CoreModule,
    MikroOrmModule.forFeature({ entities: [GiftSchema, GiftContributionSchema] }),
  ],
  providers: [GiftService, GiftSubscriber, GiftModuleRegistration],
  controllers: [GiftController],
  exports: [GiftService],
})
export class GiftModule {}
