import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AssessmentService } from './assessment.service';
import { AssessmentController } from './assessment.controller';
import { AssessmentSession } from './entities/assessment-session.entity';
import { AssessmentQuestion } from './entities/assessment-question.entity';
import { AssessmentAnswer } from './entities/assessment-answer.entity';
import { AssessmentTemplate } from './entities/assessment-template.entity';
import { KnowledgeBaseModule } from '../knowledge-base/knowledge-base.module';
import { KnowledgeGroupModule } from '../knowledge-group/knowledge-group.module';
import { ModelConfigModule } from '../model-config/model-config.module';
import { ChatModule } from '../chat/chat.module';
import { ElasticsearchModule } from '../elasticsearch/elasticsearch.module';
import { RagModule } from '../rag/rag.module';
import { TenantModule } from '../tenant/tenant.module';
import { TemplateService } from './services/template.service';
import { TemplateController } from './controllers/template.controller';
import { ContentFilterService } from './services/content-filter.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      AssessmentSession,
      AssessmentQuestion,
      AssessmentAnswer,
      AssessmentTemplate,
    ]),
    forwardRef(() => KnowledgeBaseModule),
    forwardRef(() => KnowledgeGroupModule),
    forwardRef(() => ModelConfigModule),
    forwardRef(() => ChatModule),
    ElasticsearchModule,
    RagModule,
    TenantModule,
  ],
  controllers: [AssessmentController, TemplateController],
  providers: [AssessmentService, TemplateService, ContentFilterService],
  exports: [AssessmentService, TemplateService],
})
export class AssessmentModule {}
