import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { PostsModule } from '../posts/posts.module';
import { DirectMediaUploadController } from './direct-media-upload.controller';
import { MediaController } from './media.controller';
import { AiMusicPromptEnhancerService } from './ai-music-prompt-enhancer.service';
import { MediaService } from './media.service';
import { MediaRepository } from './media.repository';
import { AiMusicArchive, AiMusicArchiveSchema } from './schemas/ai-music-archive.schema';

@Module({
  imports: [
    MongooseModule.forFeature([
      {
        name: AiMusicArchive.name,
        schema: AiMusicArchiveSchema,
      },
    ]),
    PostsModule,
  ],
  controllers: [MediaController, DirectMediaUploadController],
  providers: [MediaService, MediaRepository, AiMusicPromptEnhancerService],
  exports: [MediaService],
})
export class MediaModule {}
