import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { IntegrationModule } from '../integration/integration.module';
import { AttendanceModule } from '../attendance/attendance.module';
import {
  SyncLog,
  SyncState,
  StudentDingMapping,
  ClassSchedule,
  ClassStudent,
  User,
  Student,
  Role,
  Class,
  JinshujuMatchRule,
} from '../entities';
import { SyncService } from './sync.service';
import { SyncController } from './sync.controller';
import { ScheduleSyncService } from './schedule-sync.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      SyncLog,
      SyncState,
      StudentDingMapping,
      ClassSchedule,
      ClassStudent,
      User,
      Student,
      Role,
      Class,
      JinshujuMatchRule,
    ]),
    IntegrationModule,
    AttendanceModule,
  ],
  controllers: [SyncController],
  providers: [SyncService, ScheduleSyncService],
  exports: [SyncService],
})
export class SyncModule {}
