import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PlatformConfig } from '@/entities/platform-config.entity';
import { ConfigService } from './config.service';
import { ConfigController } from './config.controller';
import { UploadModule } from '../upload/upload.module';

@Module({
  imports: [TypeOrmModule.forFeature([PlatformConfig]), forwardRef(() => UploadModule)],
  controllers: [ConfigController],
  providers: [ConfigService],
  exports: [ConfigService],
})
export class ConfigModule {}

// 别名导出，保持兼容性
export { ConfigModule as PlatformConfigModule };