import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Workspace } from './workspace.entity';
import { WorkspaceRepository } from './workspace.repository';

@Module({
  imports: [TypeOrmModule.forFeature([Workspace], 'YourDataSourceName')], // 如果使用了特定数据源，替换'YourDataSourceName'为实际名称
  providers: [
    {
      provide: 'WORKSPACE_REPOSITORY',
      useClass: WorkspaceRepository,
    },
  ],
  exports: ['WORKSPACE_REPOSITORY'],
})
export class WorkspaceModule {}