package io.gmss.fiscad.repositories.user;

import io.gmss.fiscad.entities.user.Role;
import io.gmss.fiscad.enums.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface RoleRepository extends JpaRepository<Role, Long> {
    Optional<Role> findRoleById(Long id);

    Optional<Role> findRoleByNom(UserRole nom);

    boolean existsByNom(UserRole userRole);

    Role getRolesByNom(UserRole userRole);
}
