import { Module } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { MongooseModule } from '@nestjs/mongoose'
import { AuditModule } from './audit/audit.module.js'
import { AuthModule } from './auth/auth.module.js'
import { BillingModule } from './billing/billing.module.js'
import { DomainsModule } from './domains/domains.module.js'
import { FlagsModule } from './flags/flags.module.js'
import { HealthModule } from './health/health.module.js'
import { IngestModule } from './ingest/ingest.module.js'
import { MailModule } from './mail/mail.module.js'
import { MeModule } from './me/me.module.js'
import { PartnersModule } from './partners/partners.module.js'
import { PricesModule } from './prices/prices.module.js'
import { SchedulingModule } from './scheduling/scheduling.module.js'
import { SeedModule } from './seed/seed.module.js'
import { SubscriptionsModule } from './subscriptions/subscriptions.module.js'
import { TenantsModule } from './tenants/tenants.module.js'
import { UsersModule } from './users/users.module.js'

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal: true }),
    MongooseModule.forRoot(
      process.env.MONGODB_URI ?? 'mongodb://localhost:27017/dezky',
    ),
    AuthModule,
    AuditModule,
    HealthModule,
    TenantsModule,
    DomainsModule,
    MailModule,
    PartnersModule,
    UsersModule,
    MeModule,
    SubscriptionsModule,
    PricesModule,
    FlagsModule,
    BillingModule,
    IngestModule,
    SchedulingModule,
    SeedModule,
  ],
})
export class AppModule {}
