import { Module } from '@nestjs/common';
import { PrismaModule } from '@core/database/prisma/prisma.module';
import { EntraModule } from '../organization/entra/entra.module';
import { MeetingAttendanceMeetingsController } from './controllers/meetings.controller';
import { MeetingAttendanceCheckinController } from './controllers/checkin.controller';
import { MeetingsService } from './services/meetings.service';
import { CheckinService } from './services/checkin.service';
import { MeetingAttendanceSeriesController } from './controllers/series.controller';
import { SeriesService } from './services/series.service';
import { SeriesRepository } from './repositories/series.repository';
import { MeetingAttendanceTemplatesController } from './controllers/templates.controller';
import { TemplatesService } from './services/templates.service';
import { TemplateRepository } from './repositories/template.repository';
import { MeetingAttendanceUsersController } from './controllers/users.controller';
import { MeetingUsersService } from './services/users.service';
import { MeetingAttendanceReportsController } from './controllers/reports.controller';
import { MeetingAttendanceOutlookSyncController } from './controllers/outlook-sync.controller';
import { MeetingAttendanceOutlookWebhookController } from './controllers/outlook-webhook.controller';
import { ReportsService } from './services/reports.service';
import { MeetingAttendanceAuditLogsController } from './controllers/audit-logs.controller';
import { AuditLogsService } from './services/audit-logs.service';
import { AuditLogRepository } from './repositories/audit-log.repository';
import { MeetingAttendanceAuditLogWriter } from './services/audit-log-writer.service';
import { MeetingRepository } from './repositories/meeting.repository';
import { AttendanceRepository } from './repositories/attendance.repository';
import { RequiredAttendeeRepository } from './repositories/required-attendee.repository';
import { OutlookSyncRepository } from './repositories/outlook-sync.repository';
import { OutlookSyncService } from './services/outlook-sync.service';
import { OutlookSyncSchedulerService } from './services/outlook-sync-scheduler.service';
import { OutlookAttendeeAutoAddService } from './services/outlook-attendee-auto-add.service';
import { MeetingAttendanceCitiesController } from './controllers/cities.controller';
import { CitiesService } from './services/cities.service';
import { MeetingPtoMarkingService } from './services/meeting-pto-marking.service';
import { MeetingAttendancePtoController } from './controllers/pto.controller';
// v1.0 议程能力
import { MeetingAttendanceAgendaController } from './controllers/agenda.controller';
import { MeetingAttendanceUploadTaskController } from './controllers/upload-task.controller';
import { MeetingAttendanceAgendaItemAttachmentController } from './controllers/agenda-item-attachment.controller';
import { MeetingAttendanceMeetingAttachmentController } from './controllers/meeting-attachment.controller';
import { MeetingAttendanceAttachmentDownloadController } from './controllers/attachment-download.controller';
import { AgendaService } from './services/agenda.service';
import { UploadTaskService } from './services/upload-task.service';
import { AgendaItemAttachmentService } from './services/agenda-item-attachment.service';
import { MeetingAttachmentService } from './services/meeting-attachment.service';
import { AttachmentDownloadService } from './services/attachment-download.service';
import { AttachmentGcService } from './services/attachment-gc.service';
import { AttachmentValidator } from './services/attachment-validator.service';
import { LocalDiskStorage } from './services/storage/local-disk.storage';
import { MeetingAccessService } from './services/meeting-access.service';

@Module({
  imports: [PrismaModule, EntraModule],
  controllers: [
    MeetingAttendanceMeetingsController,
    MeetingAttendanceCheckinController,
    MeetingAttendanceSeriesController,
    MeetingAttendanceTemplatesController,
    MeetingAttendanceUsersController,
    MeetingAttendanceReportsController,
    MeetingAttendanceAuditLogsController,
    MeetingAttendanceOutlookSyncController,
    MeetingAttendanceOutlookWebhookController,
    MeetingAttendanceCitiesController,
    MeetingAttendancePtoController,
    // v1.0 议程能力
    MeetingAttendanceAgendaController,
    MeetingAttendanceUploadTaskController,
    MeetingAttendanceAgendaItemAttachmentController,
    MeetingAttendanceMeetingAttachmentController,
    MeetingAttendanceAttachmentDownloadController,
  ],
  providers: [
    MeetingsService,
    CheckinService,
    MeetingRepository,
    AttendanceRepository,
    RequiredAttendeeRepository,
    SeriesService,
    SeriesRepository,
    TemplatesService,
    TemplateRepository,
    MeetingUsersService,
    ReportsService,
    AuditLogsService,
    MeetingAttendanceAuditLogWriter,
    AuditLogRepository,
    OutlookSyncRepository,
    OutlookSyncService,
    OutlookSyncSchedulerService,
    OutlookAttendeeAutoAddService,
    CitiesService,
    MeetingPtoMarkingService,
    // v1.0 议程能力
    AgendaService,
    UploadTaskService,
    AgendaItemAttachmentService,
    MeetingAttachmentService,
    AttachmentDownloadService,
    AttachmentGcService,
    AttachmentValidator,
    LocalDiskStorage,
    MeetingAccessService,
  ],
  exports: [MeetingPtoMarkingService, MeetingAttendanceAuditLogWriter],
})
export class MeetingAttendanceModule {}
