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

0% Statements 0/22
100% Branches 0/0
100% Functions 0/0
0% Lines 0/20

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 54 55 56 57 58                                                                                                                   
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { ConfigModule } from '@nestjs/config';
import { BullModule } from '@nestjs/bull';
import { AffiliateController } from './affiliate.controller';
import { AffiliateService } from './affiliate.service';
import { User, UserSchema } from '../../database/schemas/user.schema';
import { Product, ProductSchema } from '../../database/schemas/product.schema';
import { Retailer, RetailerSchema } from '../../database/schemas/retailer.schema';
import { UserInteraction, UserInteractionSchema } from '../../database/schemas/user-interaction.schema';
import { AffiliateLink, AffiliateLinkSchema } from '../../database/schemas/affiliate-link.schema';
import { Commission, CommissionSchema } from '../../database/schemas/commission.schema';
import { InfluencerProfile, InfluencerProfileSchema } from '../../database/schemas/influencer-profile.schema';
import { LinkTrackingService } from './services/link-tracking.service';
import { CommissionService } from './services/commission.service';
import { InfluencerService } from './services/influencer.service';
import { PartnershipService } from './services/partnership.service';
import { AnalyticsService } from './services/analytics.service';
import { AffiliateProcessor } from './processors/affiliate.processor';
// import { AnalyticsService } from './services/analytics.service';
 
@Module({
  imports: [
    ConfigModule,
    MongooseModule.forFeature([
      { name: User.name, schema: UserSchema },
      { name: Product.name, schema: ProductSchema },
      { name: Retailer.name, schema: RetailerSchema },
      { name: UserInteraction.name, schema: UserInteractionSchema },
      { name: AffiliateLink.name, schema: AffiliateLinkSchema },
      { name: Commission.name, schema: CommissionSchema },
      { name: InfluencerProfile.name, schema: InfluencerProfileSchema },
    ]),
    BullModule.registerQueue({
      name: 'affiliate-processing',
    }),
  ],
  controllers: [AffiliateController],
  providers: [
    AffiliateService,
    LinkTrackingService,
    CommissionService,
    InfluencerService,
    PartnershipService,
    AnalyticsService,
    AffiliateProcessor,
  ],
  exports: [
    AffiliateService,
    LinkTrackingService,
    CommissionService,
    InfluencerService,
    PartnershipService,
    AnalyticsService,
  ],
})
export class AffiliateModule {}