diff --git a/UserRouteRepositor b/UserRouteRepositor new file mode 100644 index 0000000..3c3dc42 --- /dev/null +++ b/UserRouteRepositor @@ -0,0 +1,18 @@ +package com.power.travel.repository; + +import com.power.travel.model.TravelRoute; +import com.power.travel.model.User; +import com.power.travel.model.UserRoute; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserRouteRepository extends JpaRepository, JpaSpecificationExecutor { + + List findUserRouteByUser(User user); + + UserRoute findUserRouteByTravelRouteAndUser(TravelRoute travelRoute, User user); +}