Skip to content

Commit

Permalink
hotfix: reviewResponseDto field 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
daeun084 committed Mar 29, 2024
1 parent bf0027c commit 8636c07
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
import lombok.NoArgsConstructor;
import umc.meme.shop.domain.review.entity.Review;

import java.time.LocalDateTime;
import java.util.List;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ReviewResponseDto {
private Long reviewId;
private String modelNickName;
private String modelProfileImg;
private int star;
private String comment;
private LocalDateTime createdAt;
private List<ReviewImgDto> reviewImgDtoList;

public static ReviewResponseDto from(Review review){
Expand All @@ -26,10 +29,12 @@ public static ReviewResponseDto from(Review review){
.toList();

return ReviewResponseDto.builder()
.reviewId(review.getReviewId())
.modelNickName(review.getModel().getNickname())
.modelProfileImg(review.getModel().getProfileImg())
.star(review.getStar())
.comment(review.getComment())
.createdAt(review.getCreatedAt())
.reviewImgDtoList(reviewImgDtoList)
.build();
}
Expand Down

0 comments on commit 8636c07

Please sign in to comment.