Spaces:
Sleeping
Sleeping
| import { Module } from '@nestjs/common'; | |
| import { ConfigModule } from '@nestjs/config'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { AppController } from './app.controller'; | |
| import { AppService } from './app.service'; | |
| import { User } from './entities/user.entity'; | |
| import { Course } from './entities/course.entity'; | |
| import { Order } from './entities/order.entity'; | |
| import { Payment } from './entities/payment.entity'; | |
| import { UserCourse } from './entities/user-course.entity'; | |
| import { UserStar } from './entities/user-star.entity'; | |
| import { SystemConfig } from './entities/system-config.entity'; | |
| import { Comment } from './entities/comment.entity'; | |
| import { AuthModule } from './auth/auth.module'; | |
| import { CoursesModule } from './courses/courses.module'; | |
| import { OrdersModule } from './orders/orders.module'; | |
| import { AdminModule } from './admin/admin.module'; | |
| import { PaymentModule } from './payment/payment.module'; | |
| import { AppConfigModule } from './config/config.module'; | |
| ({ | |
| imports: [ | |
| ConfigModule.forRoot({ | |
| isGlobal: true, | |
| }), | |
| TypeOrmModule.forRoot({ | |
| type: 'sqlite', | |
| database: 'course_subscription.sqlite', | |
| entities: [ | |
| User, | |
| Course, | |
| Order, | |
| Payment, | |
| UserCourse, | |
| UserStar, | |
| SystemConfig, | |
| Comment, | |
| ], | |
| synchronize: true, // Auto-create tables in dev | |
| }), | |
| AuthModule, | |
| CoursesModule, | |
| OrdersModule, | |
| AdminModule, | |
| PaymentModule, | |
| AppConfigModule, | |
| ], | |
| controllers: [AppController], | |
| providers: [AppService], | |
| }) | |
| export class AppModule {} | |