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 { ItemQueueDataService } from './data/services/item-queue-data.service';
import { ItemQueueReadService } from './data/services/item-queue-read.service';
import { ItemQueueReadController } from './infrastructure/item-queue-read.controller';
import { ItemQueueReadOrchestrator } from './domain/usecases/item-queue-read.orchestrator';
import { ItemQueueDataController } from './infrastructure/item-queue-data.controller';
import { ItemQueueDataOrchestrator } from './domain/usecases/item-queue-data.orchestrator';
import { CreateItemQueueManager } from './domain/usecases/managers/create-item-queue.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexItemQueueManager } from './domain/usecases/managers/index-item-queue.manager';
import { DeleteItemQueueManager } from './domain/usecases/managers/delete-item-queue.manager';
import { UpdateItemQueueManager } from './domain/usecases/managers/update-item-queue.manager';
import { ActiveItemQueueManager } from './domain/usecases/managers/active-item-queue.manager';
import { ConfirmItemQueueManager } from './domain/usecases/managers/confirm-item-queue.manager';
import { InactiveItemQueueManager } from './domain/usecases/managers/inactive-item-queue.manager';
import { DetailItemQueueManager } from './domain/usecases/managers/detail-item-queue.manager';
import { BatchDeleteItemQueueManager } from './domain/usecases/managers/batch-delete-item-queue.manager';
import { BatchActiveItemQueueManager } from './domain/usecases/managers/batch-active-item-queue.manager';
import { BatchConfirmItemQueueManager } from './domain/usecases/managers/batch-confirm-item-queue.manager';
import { BatchInactiveItemQueueManager } from './domain/usecases/managers/batch-inactive-item-queue.manager';
import { ItemQueueModel } from './data/models/item-queue.model';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([ItemQueueModel], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [ItemQueueDataController, ItemQueueReadController],
  providers: [
    IndexItemQueueManager,
    DetailItemQueueManager,
    CreateItemQueueManager,
    DeleteItemQueueManager,
    UpdateItemQueueManager,
    ActiveItemQueueManager,
    ConfirmItemQueueManager,
    InactiveItemQueueManager,
    BatchDeleteItemQueueManager,
    BatchActiveItemQueueManager,
    BatchConfirmItemQueueManager,
    BatchInactiveItemQueueManager,

    ItemQueueDataService,
    ItemQueueReadService,

    ItemQueueDataOrchestrator,
    ItemQueueReadOrchestrator,
  ],
})
export class ItemQueueModule {}
