All files / src/modules/products products.module.ts

0% Statements 0/21
100% Branches 0/0
100% Functions 0/0
0% Lines 0/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 53                                                                                                         
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { ConfigModule } from '@nestjs/config';
import { BullModule } from '@nestjs/bull';
import { ProductsController } from './products.controller';
import { ProductsService } from './products.service';
import { Product, ProductSchema } from '../../database/schemas/product.schema';
import { Category, CategorySchema } from '../../database/schemas/category.schema';
import { User, UserSchema } from '../../database/schemas/user.schema';
import { UserInteraction, UserInteractionSchema } from '../../database/schemas/user-interaction.schema';
import { AIRecommendation, AIRecommendationSchema } from '../../database/schemas/ai-recommendation.schema';
import { ProductSearchService } from './services/product-search.service';
import { ProductRecommendationService } from './services/product-recommendation.service';
import { ProductAnalyticsService } from './services/product-analytics.service';
import { ProductSyncService } from './services/product-sync.service';
import { CategoryService } from './services/category.service';
import { ProductProcessor } from './processors/product.processor';
import { AIModule } from '../ai/ai.module';
 
@Module({
  imports: [
    ConfigModule,
    AIModule,
    MongooseModule.forFeature([
      { name: Product.name, schema: ProductSchema },
      { name: Category.name, schema: CategorySchema },
      { name: User.name, schema: UserSchema },
      { name: UserInteraction.name, schema: UserInteractionSchema },
      { name: AIRecommendation.name, schema: AIRecommendationSchema },
    ]),
    BullModule.registerQueue({
      name: 'product-processing',
    }),
  ],
  controllers: [ProductsController],
  providers: [
    ProductsService,
    ProductSearchService,
    ProductRecommendationService,
    ProductAnalyticsService,
    ProductSyncService,
    CategoryService,
    ProductProcessor,
  ],
  exports: [
    ProductsService,
    ProductSearchService,
    ProductRecommendationService,
    ProductAnalyticsService,
    CategoryService,
  ],
})
export class ProductsModule {}