import { Module } from '@nestjs/common';
import { LandingPagesController } from './landing-pages.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { JwtService } from '@nestjs/jwt';
import { LandingPagesService } from './landing-pages.service';
import { CacheModule } from '@nestjs/cache-manager';
import { UniversityLogosEntity } from 'src/entities/UniversityLogos.entity';

/**
 * LandingPagesModule - Module for landing page-specific content management
 *
 * This module organizes all components related to landing page content,
 * currently focused on university/partner logos but designed to be
 * extensible for other landing page components.
 *
 * Features:
 * - TypeORM integration for UniversityLogosEntity
 * - Caching support for performance optimization
 * - JWT service for potential authenticated endpoints
 * - Focused, single-responsibility module design
 *
 * @example
 * // Import into main AppModule
 * @Module({
 *   imports: [LandingPagesModule, ...],
 * })
 * export class AppModule {}
 */
@Module({
  // HTTP controllers for landing page endpoints
  controllers: [LandingPagesController],

  // Service providers for business logic
  providers: [
    LandingPagesService, // Main service for landing page content operations
    JwtService, // JWT service (useful if some endpoints need authentication)
  ],

  // Module imports for dependencies
  imports: [
    // Caching module for performance optimization
    // Landing page content benefits from caching as it rarely changes
    CacheModule.register(),

    // Database integration with landing page entities
    TypeOrmModule.forFeature([
      UniversityLogosEntity, // University/partner logos for landing pages
      // Future entities could be added here:
      // LandingPageBannersEntity,
      // LandingPageTestimonialsEntity,
      // LandingPageStatsEntity,
    ]),
  ],

  // Optional: Export services for use in other modules
  // exports: [LandingPagesService],
})
export class LandingPagesModule {}
