Skip to content

Commit

Permalink
[feat] 리뷰Repository 메서드 추가 (#110)
Browse files Browse the repository at this point in the history
- 유저가 쓴 리뷰 찾는 메서드
  • Loading branch information
yujin113 committed May 23, 2022
1 parent 01bff37 commit a718bfe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import hyangyu.server.domain.Display;
import hyangyu.server.domain.DisplayReview;
import hyangyu.server.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

Expand All @@ -16,4 +17,6 @@ public interface DisplayReviewRepository extends JpaRepository<DisplayReview, Lo
DisplayReview getDisplayReview(Long displayId, Long userId);

List<DisplayReview> findAllByDisplayOrderByCreateTimeDesc(Display display);

List<DisplayReview> findAllByUserOrderByReviewIdDesc(User user);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import hyangyu.server.domain.Fair;
import hyangyu.server.domain.FairReview;
import hyangyu.server.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

Expand All @@ -16,4 +17,6 @@ public interface FairReviewRepository extends JpaRepository<FairReview, Long> {
FairReview getFairReview(Long fairId, Long userId);

List<FairReview> findAllByFairOrderByCreateTimeDesc(Fair fair);

List<FairReview> findAllByUserOrderByReviewIdDesc(User user);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import hyangyu.server.domain.Festival;
import hyangyu.server.domain.FestivalReview;
import hyangyu.server.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

Expand All @@ -16,4 +17,6 @@ public interface FestivalReviewRepository extends JpaRepository<FestivalReview,
FestivalReview getFestivalReview(Long festivalId, Long userId);

List<FestivalReview> findAllByFestivalOrderByCreateTimeDesc(Festival festival);

List<FestivalReview> findAllByUserOrderByReviewIdDesc(User user);
}

0 comments on commit a718bfe

Please sign in to comment.