import { Module } from '@nestjs/common';
import { AiConfigService } from './ai-config.service';
import { AiConfigController } from './ai-config.controller';
import { WorkspaceModule } from '../workspace/workspace.module';
import { AiConfigRepository } from './ai-config.repository';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AiConfig } from './ai-config.entity';
import { WorkspaceRepository } from '../workspace/workspace.repository'; // 新增导入
import { JwtStrategy } from '@src/auth';

@Module({
  imports: [WorkspaceModule, TypeOrmModule.forFeature([AiConfig])],
  providers: [
    AiConfigService,
    AiConfigRepository,
    WorkspaceRepository, // 添加缺失的依赖
    JwtStrategy
  ],
  controllers: [AiConfigController],
  exports: [AiConfigService]
})
export class AiModule {}