import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { ApiTimingInterceptor } from './common/interceptors/api-timing.interceptor';
import { AuthModule } from './common/auth/auth.module';
import { PrismaModule } from './prisma/prisma.module';
import { ProductModule } from './modules/product/product.module';
import { ProjectModule } from './modules/project/project.module';
import { RequirementModule } from './modules/requirement/requirement.module';
import { VersionModule } from './modules/version/version.module';
import { VersionPlanModule } from './modules/version-plan/version-plan.module';
import { DevTaskModule } from './modules/dev-task/dev-task.module';
import { TestCaseModule } from './modules/test-case/test-case.module';
import { BugModule } from './modules/bug/bug.module';
import { MemberModule } from './modules/member/member.module';
import { TaskCategoryModule } from './modules/task-category/task-category.module';
import { TaskWorklogModule } from './modules/task-worklog/task-worklog.module';
import { OvertimeModule } from './modules/overtime/overtime.module';
import { AiModule } from './modules/ai/ai.module';
import { ConfigModule } from './modules/config/config.module';
import { DataModule } from './modules/data/data.module';
import { MigrationModule } from './modules/migration/migration.module';
import { V22QueryModule } from './modules/v22-query/v22-query.module';
import { HealthModule } from './modules/health/health.module';

@Module({
  imports: [
    PrismaModule,
    AuthModule,
    ProductModule,
    ProjectModule,
    VersionModule,
    VersionPlanModule,
    DevTaskModule,
    TestCaseModule,
    BugModule,
    MemberModule,
    TaskCategoryModule,
    TaskWorklogModule,
    OvertimeModule,
    RequirementModule,
    ConfigModule,
    DataModule,
    MigrationModule,
    V22QueryModule,
    HealthModule,
    AiModule,
  ],
  controllers: [],
  providers: [
    {
      provide: APP_INTERCEPTOR,
      useClass: ApiTimingInterceptor,
    },
  ],
})
export class AppModule {}
