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 { BannerDataService } from './data/services/banner-data.service';
import { BannerReadService } from './data/services/banner-read.service';
import { BannerReadController } from './infrastructure/banner-read.controller';
import { BannerReadOrchestrator } from './domain/usecases/banner-read.orchestrator';
import { BannerDataController } from './infrastructure/banner-data.controller';
import { BannerDataOrchestrator } from './domain/usecases/banner-data.orchestrator';
import { CreateBannerManager } from './domain/usecases/managers/create-banner.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexBannerManager } from './domain/usecases/managers/index-banner.manager';
import { DeleteBannerManager } from './domain/usecases/managers/delete-banner.manager';
import { UpdateBannerManager } from './domain/usecases/managers/update-banner.manager';
import { ActiveBannerManager } from './domain/usecases/managers/active-banner.manager';
import { ConfirmBannerManager } from './domain/usecases/managers/confirm-banner.manager';
import { InactiveBannerManager } from './domain/usecases/managers/inactive-banner.manager';
import { DetailBannerManager } from './domain/usecases/managers/detail-banner.manager';
import { BatchDeleteBannerManager } from './domain/usecases/managers/batch-delete-banner.manager';
import { BatchActiveBannerManager } from './domain/usecases/managers/batch-active-banner.manager';
import { BatchConfirmBannerManager } from './domain/usecases/managers/batch-confirm-banner.manager';
import { BatchInactiveBannerManager } from './domain/usecases/managers/batch-inactive-banner.manager';
import { BannerModel } from './data/models/banner.model';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([BannerModel], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [BannerDataController, BannerReadController],
  providers: [
    IndexBannerManager,
    DetailBannerManager,
    CreateBannerManager,
    DeleteBannerManager,
    UpdateBannerManager,
    ActiveBannerManager,
    ConfirmBannerManager,
    InactiveBannerManager,
    BatchDeleteBannerManager,
    BatchActiveBannerManager,
    BatchConfirmBannerManager,
    BatchInactiveBannerManager,

    BannerDataService,
    BannerReadService,

    BannerDataOrchestrator,
    BannerReadOrchestrator,
  ],
})
export class BannerModule {}
