import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';
import { TimeGroupDataService } from './data/services/time-group-data.service';
import { TimeGroupReadService } from './data/services/time-group-read.service';
import {
  TimeGroupPublicReadController,
  TimeGroupReadController,
} from './infrastructure/time-group-read.controller';
import { TimeGroupReadOrchestrator } from './domain/usecases/time-group-read.orchestrator';
import { TimeGroupDataController } from './infrastructure/time-group-data.controller';
import { TimeGroupDataOrchestrator } from './domain/usecases/time-group-data.orchestrator';
import { CreateTimeGroupManager } from './domain/usecases/managers/create-time-group.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexTimeGroupManager } from './domain/usecases/managers/index-time-group.manager';
import { DeleteTimeGroupManager } from './domain/usecases/managers/delete-time-group.manager';
import { UpdateTimeGroupManager } from './domain/usecases/managers/update-time-group.manager';
import { ActiveTimeGroupManager } from './domain/usecases/managers/active-time-group.manager';
import { ConfirmTimeGroupManager } from './domain/usecases/managers/confirm-time-group.manager';
import { InactiveTimeGroupManager } from './domain/usecases/managers/inactive-time-group.manager';
import { DetailTimeGroupManager } from './domain/usecases/managers/detail-time-group.manager';
import { BatchDeleteTimeGroupManager } from './domain/usecases/managers/batch-delete-time-group.manager';
import { BatchActiveTimeGroupManager } from './domain/usecases/managers/batch-active-time-group.manager';
import { BatchConfirmTimeGroupManager } from './domain/usecases/managers/batch-confirm-time-group.manager';
import { BatchInactiveTimeGroupManager } from './domain/usecases/managers/batch-inactive-time-group.manager';
import { TimeGroupModel } from './data/models/time-group.model';
import { IndexPublicTimeGroupManager } from './domain/usecases/managers/index-public-time-group.manager';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([TimeGroupModel], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [
    TimeGroupDataController,
    TimeGroupReadController,
    TimeGroupPublicReadController,
  ],
  providers: [
    IndexPublicTimeGroupManager,
    IndexTimeGroupManager,
    DetailTimeGroupManager,
    CreateTimeGroupManager,
    DeleteTimeGroupManager,
    UpdateTimeGroupManager,
    ActiveTimeGroupManager,
    ConfirmTimeGroupManager,
    InactiveTimeGroupManager,
    BatchDeleteTimeGroupManager,
    BatchActiveTimeGroupManager,
    BatchConfirmTimeGroupManager,
    BatchInactiveTimeGroupManager,

    TimeGroupDataService,
    TimeGroupReadService,

    TimeGroupDataOrchestrator,
    TimeGroupReadOrchestrator,
  ],
})
export class TimeGroupModule {}
