import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PaymentEntity } from '../domain/entities/payment.entity';
import { OrderModule } from '../order/order.module';
import { PaymentService } from './payment.service';
import { PaymentController } from './payment.controller';
import { AlipayAdapter } from './adapters/alipay.adapter';
import { WechatPayAdapter } from './adapters/wechat-pay.adapter';
import { StripeAdapter } from './adapters/stripe.adapter';

@Module({
  imports: [
    TypeOrmModule.forFeature([PaymentEntity]),
    OrderModule,
  ],
  controllers: [PaymentController],
  providers: [
    PaymentService,
    AlipayAdapter,
    WechatPayAdapter,
    StripeAdapter,
  ],
  exports: [PaymentService],
})
export class PaymentModule {}
