package cn.reghao.bnt.web.admin.db.repository;

import cn.reghao.bnt.web.admin.model.po.Menu;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author reghao
 * @date 2019-08-29 10:52:14
 */
public interface MenuRepository extends JpaRepository<Menu, Integer> {
    int countByPid(int pid);
    List<Menu> findByPid(int pid);
    Menu findByDeletedIsFalseAndTypeAndUrl(String type, String url);
    List<Menu> findAllByDeleted(boolean enabled);
    List<Menu> findByDeletedIsFalseAndType(String type);
}
