import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';

import { ConfigModule } from '@nestjs/config';
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ItemModel } from 'src/modules/item-related/item/data/models/item.model';
import { ItemModule } from 'src/modules/item-related/item/item.module';
import { ItemController } from './infrastructure/item.controller';
import { TransactionModule } from 'src/modules/transaction/transaction/transaction.module';
import { BookingOrderController } from './infrastructure/order.controller';
import { CreateBookingManager } from './domain/usecases/managers/create-booking.manager';
import { MidtransModule } from 'src/modules/configuration/midtrans/midtrans.module';
import { CqrsModule } from '@nestjs/cqrs';
import { RescheduleVerificationModel } from './data/models/reschedule-verification.model';
import { RescheduleVerificationManager } from './domain/usecases/managers/reschedule-verification.manager';
import { RescheduleManager } from './domain/usecases/managers/reschedule.manager';
import { BookingItemManager } from './domain/usecases/managers/booking-item.manager';
@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature(
      [ItemModel, RescheduleVerificationModel],
      CONNECTION_NAME.DEFAULT,
    ),
    ItemModule,
    TransactionModule,
    MidtransModule,
    CqrsModule,
  ],
  controllers: [ItemController, BookingOrderController],
  providers: [
    CreateBookingManager,
    RescheduleVerificationManager,
    RescheduleManager,
    BookingItemManager,
  ],
})
export class BookingOrderModule {}
