import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { BlocksModule } from '../blocks/blocks.module';
import { FollowsModule } from '../follows/follows.module';
import { LikesModule } from '../likes/likes.module';
import { MarketplaceModule } from '../marketplace/marketplace.module';
import { Follow, FollowSchema } from '../follows/schemas/follow.schema';
import { Post, PostSchema } from '../posts/schemas/post.schema';
import { SavesModule } from '../saves/saves.module';
import { UsersModule } from '../users/users.module';
import { FeedController } from './feed.controller';
import { FeedService } from './feed.service';
import { FeedRepository } from './feed.repository';

@Module({
  imports: [
    UsersModule,
    BlocksModule,
    LikesModule,
    SavesModule,
    FollowsModule,
    MarketplaceModule,
    MongooseModule.forFeature([
      { name: Post.name, schema: PostSchema },
      { name: Follow.name, schema: FollowSchema },
    ]),
  ],
  controllers: [FeedController],
  providers: [FeedService, FeedRepository],
  exports: [FeedService],
})
export class FeedModule {}
