Add UserRouteRepositor

houhuifang
pgbry645q 5 months ago
parent 5126c98cb6
commit dd2dd0e0cf

@ -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<UserRoute, String>, JpaSpecificationExecutor<UserRoute> {
List<UserRoute> findUserRouteByUser(User user);
UserRoute findUserRouteByTravelRouteAndUser(TravelRoute travelRoute, User user);
}
Loading…
Cancel
Save