Spaces:
Sleeping
Sleeping
File size: 1,602 Bytes
73746a8 8268e91 73746a8 f45e448 426f2a4 73746a8 426f2a4 73746a8 426f2a4 73746a8 426f2a4 73746a8 8268e91 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 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';
@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 {}
|