package cn.com.qmth.stmms.biz.basic.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import cn.com.qmth.stmms.biz.basic.model.Privilege;
import cn.com.qmth.stmms.common.enums.PrivilegeType;

public interface PrivilegeDao extends PagingAndSortingRepository<Privilege, Integer>, JpaSpecificationExecutor<Privilege>,
        JpaRepository<Privilege, Integer> {

	List<Privilege> findByPrivilegeTypeOrderByLevelAscSeqAsc(PrivilegeType menu);

	List<Privilege> findByPrivilegeTypeAndParentCodeOrderBySeqAsc(PrivilegeType page, String parentCode);

}
