package com.toyshop.repository;

import com.toyshop.entity.User;
import com.toyshop.entity.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;

public interface UserRepository extends JpaRepository<User, Long> {
  Optional<User> findByUsername(String username);
  long countByRole(UserRole role);
}
