import { AbstractRepository } from "./AbstractRepository.js";
import { UserEntity } from "../entities/UserEntity.js";

export class UserRepository extends AbstractRepository<UserEntity> {
  constructor() {
    super(UserEntity);
  }

  async findByUserName(userName: string): Promise<UserEntity | null> {
    return this.repo.findOne({ where: { userName } });
  }
}
