-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: 한줄요약 리스트 응답 시 자세한 정보가 아닌 간략한 정보를 응답하는 부분 수정 (#150)
- Loading branch information
Showing
8 changed files
with
90 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/cotato/bookitlist/review/dto/response/ReviewDetailResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cotato.bookitlist.review.dto.response; | ||
|
||
import cotato.bookitlist.review.domain.ReviewStatus; | ||
import cotato.bookitlist.review.dto.ReviewDetailDto; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record ReviewDetailResponse( | ||
Long reviewId, | ||
Long memberId, | ||
Long bookId, | ||
String content, | ||
int likeCount, | ||
int viewCount, | ||
LocalDateTime createdAt, | ||
LocalDateTime modifiedAt, | ||
boolean liked, | ||
boolean isMine, | ||
ReviewStatus reviewStatus | ||
) { | ||
public static ReviewDetailResponse from(ReviewDetailDto dto, Long memberId) { | ||
return new ReviewDetailResponse( | ||
dto.reviewId(), | ||
dto.memberId(), | ||
dto.bookId(), | ||
dto.content(), | ||
dto.likeCount(), | ||
dto.viewCount(), | ||
dto.createdAt(), | ||
dto.modifiedAt(), | ||
dto.liked(), | ||
dto.memberId().equals(memberId), | ||
dto.reviewStatus() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters