import { Module } from '@nestjs/common'
import { WeixinController } from './weixin.controller'
import { WeixinService } from './weixin.service'
import weixinConfig from './weixin.config'
import { ConfigModule } from '@nestjs/config'
import { TypeOrmModule } from '@nestjs/typeorm'
import { AccessTokenCache } from './entities/access-token-cache.entity'
import { JsapiTicketCache } from './entities/jsapi-ticket-cache.entity'

@Module({
    imports: [ConfigModule.forFeature(weixinConfig), TypeOrmModule.forFeature([AccessTokenCache, JsapiTicketCache])],
    controllers: [WeixinController],
    providers: [WeixinService],
    exports: [WeixinService]
})
export class WeixinModule {}
