package common.repository;

import common.model.Role;
import common.model.RoleType;
import common.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface RoleRepository extends JpaRepository<Role, Long> {
    @Query(value="select role from role where role_key = ?1",nativeQuery=true)
    String getName(Long key);
}
