package com.yaoyuan.jiscuss.repository;

import com.yaoyuan.jiscuss.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleRepository extends JpaRepository<Role, Integer> {
    Role findByCode(String code);

    Role findByCodeIgnoreCase(String code);

    List<Role> findAllByOrderByIdAsc();
}
