menu controller et repo

This commit is contained in:
Blandine Bajard 2022-01-19 16:01:44 +01:00
parent f164000cc8
commit 90498a2cd1
3 changed files with 107 additions and 2 deletions

View file

@ -1,4 +1,17 @@
package fr.organizee.repository;
public interface MenuRepository {
import fr.organizee.model.Contact;
import fr.organizee.model.Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface MenuRepository extends JpaRepository <Menu, Integer> {
@Query(value = "select * from menu where team_id = :team_id", nativeQuery = true)
List<Menu> FindMenusByTeam(@Param("team_id") int team_id);
}