package com.ecep.contract.ds.other.repository;

import java.util.List;

import org.springframework.context.annotation.Lazy;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.ecep.contract.model.Permission;

@Lazy
@Repository
public interface PermissionRepository extends
        // JDBC interfaces
        CrudRepository<Permission, Integer>, PagingAndSortingRepository<Permission, Integer>,
        // JPA interfaces
        JpaRepository<Permission, Integer>, JpaSpecificationExecutor<Permission> {


    List<Permission> findAllByFunctionId(Integer functionId);


}
