import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { TripsModule } from '../trips/trips.module';
import { TrackingModule } from '../tracking/tracking.module';
import { SettingsModule } from '../settings/settings.module';
import { User, UserSchema } from '../users/schemas/user.schema';
import { GpsPoint, GpsPointSchema } from '../gps/schemas/gps-point.schema';
import { Trip, TripSchema } from '../trips/schemas/trip.schema';
import { Punch, PunchSchema } from '../punches/schemas/punch.schema';
import { GpsStop, GpsStopSchema } from '../gps/schemas/gps-stop.schema';
import { AdminController } from './admin.controller';
import { AdminService } from './admin.service';

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: User.name, schema: UserSchema },
      { name: GpsPoint.name, schema: GpsPointSchema },
      { name: Trip.name, schema: TripSchema },
      { name: Punch.name, schema: PunchSchema },
      { name: GpsStop.name, schema: GpsStopSchema },
    ]),
    TripsModule,
    TrackingModule,
    SettingsModule,
  ],  controllers: [AdminController],
  providers: [AdminService],
  exports: [AdminService],
})
export class AdminModule {}
