import { Module, forwardRef } from '@nestjs/common'
import { MembershipService } from './membership.service'
import { MembershipController } from './membership.controller'
import { TypeOrmModule } from '@nestjs/typeorm'
import { Membership } from './entities/membership.entity'
import { MemberPlan } from './entities/memberPlan.entity'
import { MembershipAdminController } from './membership.admin.controller'
import { MemberOrder } from './entities/member-order.entity'
import { WeixinModule } from '../weixin/weixin.module'
import { CommissionModule } from '../commission/commission.module'
import { SysConfigModule } from '../sys-config/sys-config.module'

@Module({
    imports: [
        TypeOrmModule.forFeature([Membership, MemberPlan, MemberOrder]),
        WeixinModule,
        forwardRef(() => CommissionModule),
        SysConfigModule
    ],
    providers: [MembershipService],
    controllers: [MembershipController, MembershipAdminController],
    exports: [MembershipService]
})
export class MembershipModule {}
