Skip to content

Commit

Permalink
Merge pull request #187 from 1jeongg/feature/review-all-field-name-wj
Browse files Browse the repository at this point in the history
리뷰 전체 조회에서 coupleName 필드 변경
  • Loading branch information
chaee813 authored Nov 10, 2023
2 parents 752420d + 744aa83 commit b49e565
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public ReviewResponse.FindAllByPlannerDTO getFindAllByPlannerDTO(List<Review> re
}

public ReviewResponse.FindAllByCoupleDTO getFindAllByCoupleDTO(List<Review> reviews, List<ReviewImageItem> reviewImageItems) {
List<ReviewResponse.FindByUserDTO> reviewDTOS = reviews.stream()
.map(review -> new ReviewResponse.FindByUserDTO(
List<ReviewResponse.FindByPlannerDTO> reviewDTOS = reviews.stream()
.map(review -> new ReviewResponse.FindByPlannerDTO(
review.id,
(review.getMatch().getPlanner() != null) ? review.getMatch().getPlanner().getUsername() : "탈퇴한 사용자" ,
review.stars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public record FindAllByPlannerDTO(
) {}

public record FindAllByCoupleDTO(
List<FindByUserDTO> reviews
List<FindByPlannerDTO> reviews
) {}

public record FindByUserDTO(
Expand All @@ -19,6 +19,14 @@ public record FindByUserDTO(
List<String> images
) {}

public record FindByPlannerDTO(
Long id,
String plannerName,
Integer stars,
String content,
List<String> images
) {}

public record ReviewDTO(
Long id,
Long portfolioId,
Expand Down

0 comments on commit b49e565

Please sign in to comment.