import { Module } from '@nestjs/common';
import { UserService } from './providers/user.service';
import { UsersController } from './controllers/users.controller';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { User } from './entities/user.entity';
import { UserAddress } from './entities/user-address.entity';
import { JwtModule } from '@nestjs/jwt';
import { UserRepository } from './repositories/user.repository';
import { RestaurantsModule } from '../restaurants/restaurants.module';
import { WalletTransactionRepository } from './repositories/wallet-transaction.repository';
import { WalletService } from './providers/wallet.service';
import { WalletTransaction } from './entities/wallet-transaction.entity';
import { PointTransaction } from './entities/point-transaction.entity';
import { PointTransactionRepository } from './repositories/point-transaction.repository';

@Module({
  providers: [UserService, WalletService, UserRepository, WalletTransactionRepository, PointTransactionRepository],
  controllers: [UsersController],
  imports: [
    MikroOrmModule.forFeature([User, UserAddress, WalletTransaction, PointTransaction]),
    JwtModule,
    RestaurantsModule,
  ],
  exports: [UserService, WalletService, UserRepository, WalletTransactionRepository, PointTransactionRepository],
})
export class UserModule {}
