返回 AiToEarn
user.module.ts
根目录 / project / aitoearn-electron / server / src / user / user.module.ts
1 /*
2 * @Author: nevin
3 * @Date: 2024-06-17 19:19:07
4 * @LastEditTime: 2024-12-07 22:21:47
5 * @LastEditors: nevin
6 * @Description: 用户模块
7 */
8 import { Global, Module } from '@nestjs/common';
9 import { UserService } from './user.service';
10 import { UserController } from './user.controller';
11 import { LoginService } from './login.service';
12 import { MongooseModule } from '@nestjs/mongoose';
13 import { User, UserSchema } from '../db/schema/user.schema';
14 import { WxModule } from '../lib/wx/wx.module';
15 import { UserAdminController } from './user-admin.controller';
16 import { WxGzhController } from './wxGzh.controller';
17 import { PlatAuthModule } from 'src/lib/platAuth/platAuth.module';
18 import { UserWallet, UserWalletSchema } from 'src/db/schema/userWallet.shema';
19 import { UserPopController } from './userPop.controller';
20 import { RealAuth, RealAuthSchema } from 'src/db/schema/realAuth.schema';
21 import { RealAuthService } from './realAuth.service';
22 import { UserConfigController } from './userConfig.controller';
23 import { UserConfigService } from './userConfig.service';
24 import { UserLoginController } from './userLogin.controller';
25
26 @Global()
27 @Module({
28 imports: [
29 PlatAuthModule,
30 MongooseModule.forFeature([
31 { name: User.name, schema: UserSchema },
32 { name: UserWallet.name, schema: UserWalletSchema },
33 { name: RealAuth.name, schema: RealAuthSchema },
34 ]),
35 WxModule,
36 ],
37 providers: [UserService, LoginService, RealAuthService, UserConfigService],
38 controllers: [
39 UserLoginController,
40 UserController,
41 UserAdminController,
42 WxGzhController,
43 UserPopController,
44 UserConfigController,
45 ],
46 exports: [UserService, MongooseModule],
47 })
48 export class UserModule {}
49
49 lines TYPESCRIPT