import { Module, Global } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from './user.entity';
import { UserSetting } from './user-setting.entity';
import { UserSettingService } from './user-setting.service';
import { TenantMember } from '../tenant/tenant-member.entity';
import { ApiKey } from '../auth/entities/api-key.entity';
import { UserService } from './user.service';
import { UserController } from './user.controller';
import { TenantModule } from '../tenant/tenant.module';

@Global()
@Module({
  imports: [
    TypeOrmModule.forFeature([User, ApiKey, TenantMember, UserSetting]),
    TenantModule,
  ],
  controllers: [UserController],
  providers: [UserService, UserSettingService],
  exports: [UserService, UserSettingService],
})
export class UserModule { }
