import { Module, forwardRef } from '@nestjs/common';
import { KnowledgeBaseModule } from '../knowledge-base/knowledge-base.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { KnowledgeGroup } from './knowledge-group.entity';
import { KnowledgeBase } from '../knowledge-base/knowledge-base.entity';
import { KnowledgeGroupService } from './knowledge-group.service';
import { KnowledgeGroupController } from './knowledge-group.controller';
import { ElasticsearchModule } from '../elasticsearch/elasticsearch.module';
import { I18nModule } from '../i18n/i18n.module';
import { UserModule } from '../user/user.module';
import { CombinedAuthGuard } from '../auth/combined-auth.guard';

@Module({
  imports: [
    TypeOrmModule.forFeature([KnowledgeGroup, KnowledgeBase]),
    forwardRef(() => ElasticsearchModule),
    forwardRef(() => KnowledgeBaseModule),
    I18nModule,
    UserModule,
  ],
  controllers: [KnowledgeGroupController],
  providers: [KnowledgeGroupService, CombinedAuthGuard],
  exports: [KnowledgeGroupService],
})
export class KnowledgeGroupModule { }