Skip to content

Commit

Permalink
feat : 응답 dto에 id값 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jeong724 committed Jan 13, 2025
1 parent e033d3b commit 72f41d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/itstime/reflog/community/dto/CommunityDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public static class CombinedCategoryResponse {
private Boolean isLike;
private int totalLike;
private Long totalComment;
private Long postId;

public static CombinedCategoryResponse fromCommunity(Community community, String writer, Boolean isLike, Integer totalLike, Long totalComment) {
return CombinedCategoryResponse.builder()
Expand All @@ -57,6 +58,7 @@ public static CombinedCategoryResponse fromCommunity(Community community, String
.totalComment(totalComment)
.totalLike(totalLike)
.writer(writer)
.postId(community.getId())
.build();
}

Expand All @@ -74,6 +76,7 @@ public static CombinedCategoryResponse fromRetrospect(Retrospect retrospect, Str
.totalLike(totalLike)
.totalComment(totalComment)
.writer(writer)
.postId(retrospect.getId())
.build();
}
}
Expand Down

0 comments on commit 72f41d3

Please sign in to comment.