import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { AdminController } from './admin.controller'
import { User, UserSchema } from '../user/user.schema'
import { Interview, InterviewSchema } from '../interview/interview.schema'
import { PaymentOrder, PaymentOrderSchema } from '../payment/payment-order.schema'
import { WechatPayService } from '../payment/wechat-pay.service'

import { SiteConfig, SiteConfigSchema } from '../schemas/site-config.schema'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: User.name, schema: UserSchema },
      { name: Interview.name, schema: InterviewSchema },
      { name: PaymentOrder.name, schema: PaymentOrderSchema },
      { name: SiteConfig.name, schema: SiteConfigSchema },
    ]),
  ],
  controllers: [AdminController],
  providers: [WechatPayService],
})
export class AdminModule {}
