import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MerchantFinanceController } from './finance.controller';
import { MerchantFinanceService } from './finance.service';
import { SettlementMerchantController } from './settlement-merchant.controller';
import { WithdrawalMerchantController } from './withdrawal-merchant.controller';
import { TransactionSellerController } from './transaction-seller.controller';
import { MerchantAccount } from '@/entities/merchant-account.entity';
import { MerchantTransaction } from '@/entities/merchant-transaction.entity';
import { MerchantProfileModule } from '../profile/profile.module';
import { MerchantModule } from '../merchant.module';
import { FinanceModule } from '@/modules/shared/finance/finance.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([MerchantAccount, MerchantTransaction]),
    MerchantProfileModule,
    forwardRef(() => MerchantModule),
    forwardRef(() => FinanceModule),
  ],
  controllers: [
    MerchantFinanceController,
    SettlementMerchantController,
    WithdrawalMerchantController,
    TransactionSellerController,
  ],
  providers: [MerchantFinanceService],
  exports: [MerchantFinanceService],
})
export class MerchantFinanceModule {}
