import { Injectable } from '@nestjs/common';
import { UserRepository } from './user.repository';

@Injectable()
export class UserService {
  constructor(private readonly userRepository: UserRepository) {}

  create(createUserDto: any) {
    return this.userRepository.create(createUserDto);
  }

  findByEmail(email: string) {
    return this.userRepository.findOne({ where: { email } });
  }
}