import { Module } from "@nestjs/common";
import { APP_GUARD } from "@nestjs/core";
import { ExamsModule } from "./exams/exams.module.js";
import { HomeworkModule } from "./homework/homework.module.js";
import { GradesModule } from "./grades/grades.module.js";
import { HealthModule } from "./shared/health/health.module.js";
import { PermissionGuard } from "./middleware/permission.guard.js";
import { LifecycleService } from "./shared/lifecycle/lifecycle.service.js";

@Module({
  imports: [ExamsModule, HomeworkModule, GradesModule, HealthModule],
  providers: [
    { provide: APP_GUARD, useClass: PermissionGuard },
    LifecycleService,
  ],
})
export class AppModule {}
