import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BullModule } from '@nestjs/bullmq';
import { RawEvent } from '../entities/raw-event.entity';
import { SessionFingerprint } from '../entities/session-fingerprint.entity';
import { TrackingService } from './tracking.service';
import { TrackingController } from './tracking.controller';
import { DeviceEnrichmentService } from './device-enrichment.service';
import { AttributionService } from './attribution.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([RawEvent, SessionFingerprint]),
    BullModule.registerQueue({
      name: 'analytics-events',
    }),
  ],
  controllers: [TrackingController],
  providers: [TrackingService, DeviceEnrichmentService, AttributionService],
  exports: [TrackingService],
})
export class TrackingModule {}
