| 1 | /* |
| 2 | * @Author: |
| 3 | * @Date: 2025-06-06 |
| 4 | * @LastEditTime: 2025-06-06 |
| 5 | * @Description: TikTok模块 |
| 6 | */ |
| 7 | import { Module } from '@nestjs/common'; |
| 8 | import { HttpModule } from '@nestjs/axios'; |
| 9 | import { ConfigModule } from '@nestjs/config'; |
| 10 | import { MongooseModule } from '@nestjs/mongoose'; |
| 11 | |
| 12 | import { TikTokController } from './tiktok.controller'; |
| 13 | import { TikTokService } from './tiktok.service'; |
| 14 | import { TikTokAuthService } from './tiktok.auth.service'; |
| 15 | import { PubRecord, PubRecordSchema } from 'src/db/schema/pubRecord.schema'; |
| 16 | import tiktokConfig from 'config/tiktok.config'; |
| 17 | import { User, UserSchema } from 'src/db/schema/user.schema'; |
| 18 | import { Account, AccountSchema } from 'src/db/schema/account.schema'; |
| 19 | import { AccountToken, AccountTokenSchema } from 'src/db/schema/accountToken.schema'; |
| 20 | import { UserModule } from 'src/user/user.module'; |
| 21 | import { RedisModule } from 'src/lib/redis/redis.module'; |
| 22 | import { AuthModule } from 'src/auth/auth.module'; |
| 23 | import { AccountModule } from 'src/modules/account/account.module'; |
| 24 | import { forwardRef } from '@nestjs/common'; |
| 25 | |
| 26 | @Module({ |
| 27 | imports: [ |
| 28 | ConfigModule.forRoot({ |
| 29 | load: [tiktokConfig], |
| 30 | }), |
| 31 | HttpModule, |
| 32 | MongooseModule.forFeature([ |
| 33 | { name: User.name, schema: UserSchema }, |
| 34 | { name: Account.name, schema: AccountSchema }, |
| 35 | { name: AccountToken.name, schema: AccountTokenSchema }, |
| 36 | { name: PubRecord.name, schema: PubRecordSchema }, |
| 37 | ]), |
| 38 | UserModule, |
| 39 | RedisModule, |
| 40 | forwardRef(() => AuthModule), |
| 41 | forwardRef(() => AccountModule), |
| 42 | ], |
| 43 | controllers: [TikTokController], |
| 44 | providers: [TikTokService, TikTokAuthService], |
| 45 | exports: [TikTokService, TikTokAuthService] |
| 46 | }) |
| 47 | export class TiktokModule { } |
| 48 |