import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { BlocksModule } from '../blocks/blocks.module';
import { OutboxModule } from '../outbox/outbox.module';
import { UsersModule } from '../users/users.module';
import { FollowsController } from './follows.controller';
import { FollowsUsersController } from './follows-users.controller';
import { FollowsService } from './follows.service';
import { FollowsRepository } from './follows.repository';
import { FollowRequest, FollowRequestSchema } from './schemas/follow-request.schema';
import { Follow, FollowSchema } from './schemas/follow.schema';

@Module({
  imports: [
    BlocksModule,
    UsersModule,
    OutboxModule,
    MongooseModule.forFeature([
      {
        name: Follow.name,
        schema: FollowSchema,
      },
      {
        name: FollowRequest.name,
        schema: FollowRequestSchema,
      },
    ]),
  ],
  controllers: [FollowsController, FollowsUsersController],
  providers: [FollowsService, FollowsRepository],
  exports: [FollowsService, FollowsRepository],
})
export class FollowsModule {}
