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 { RefundDataService } from './data/services/refund-data.service';
import { RefundReadService } from './data/services/refund-read.service';
import { RefundReadController } from './infrastructure/refund-read.controller';
import { RefundReadOrchestrator } from './domain/usecases/refund-read.orchestrator';
import { RefundDataController } from './infrastructure/refund-data.controller';
import { RefundDataOrchestrator } from './domain/usecases/refund-data.orchestrator';
import { CreateRefundManager } from './domain/usecases/managers/create-refund.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexRefundManager } from './domain/usecases/managers/index-refund.manager';
import { DeleteRefundManager } from './domain/usecases/managers/delete-refund.manager';
import { UpdateRefundManager } from './domain/usecases/managers/update-refund.manager';
import { ConfirmRefundManager } from './domain/usecases/managers/confirm-refund.manager';
import { DetailRefundManager } from './domain/usecases/managers/detail-refund.manager';
import { BatchDeleteRefundManager } from './domain/usecases/managers/batch-delete-refund.manager';
import { BatchConfirmRefundManager } from './domain/usecases/managers/batch-confirm-refund.manager';
import { RefundModel } from './data/models/refund.model';
import { BatchCancelRefundManager } from './domain/usecases/managers/batch-cancel-refund.manager';
import { CancelRefundManager } from './domain/usecases/managers/cancel-refund.manager';
import { RefundItemModel } from './data/models/refund-item.model';
import { TransactionDataService } from '../transaction/data/services/transaction-data.service';
import { TransactionModel } from '../transaction/data/models/transaction.model';
import { CouchModule } from 'src/modules/configuration/couch/couch.module';
@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature(
      [RefundModel, RefundItemModel, TransactionModel],
      CONNECTION_NAME.DEFAULT,
    ),
    CqrsModule,
    CouchModule,
  ],
  controllers: [RefundDataController, RefundReadController],
  providers: [
    IndexRefundManager,
    DetailRefundManager,
    CreateRefundManager,
    DeleteRefundManager,
    UpdateRefundManager,
    ConfirmRefundManager,
    CancelRefundManager,
    BatchDeleteRefundManager,
    BatchConfirmRefundManager,
    BatchCancelRefundManager,

    RefundDataService,
    RefundReadService,
    TransactionDataService,

    RefundDataOrchestrator,
    RefundReadOrchestrator,
  ],
})
export class RefundModule {}
