Skip to content

Commit fb5eb5a

Browse files
committed
fix: #33 커서 값을위한 생성일 추가
1 parent 040f0bd commit fb5eb5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/leets/xcellentbe/domain/article/dto/ArticleResponseDto.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.leets.xcellentbe.domain.article.dto;
22

3+
import java.time.LocalDateTime;
34
import java.util.List;
45
import java.util.Map;
56
import java.util.UUID;
@@ -33,12 +34,13 @@ public class ArticleResponseDto {
3334
private long likeCnt;
3435
private long commentCnt;
3536
private boolean owner;
37+
private LocalDateTime createdAt;
3638

3739
@Builder
3840
private ArticleResponseDto(UUID articleId, String userName, String customId, String content,
3941
DeletedStatus deletedStatus,
4042
List<String> hashtags, UUID rePostId, List<String> mediaUrls, List<CommentResponseDto> comments,
41-
int viewCnt, long rePostCnt, long likeCnt, long commentCnt, boolean owner) {
43+
int viewCnt, long rePostCnt, long likeCnt, long commentCnt, boolean owner, LocalDateTime createdAt) {
4244
this.articleId = articleId;
4345
this.userName = userName;
4446
this.customId = customId;
@@ -53,6 +55,7 @@ private ArticleResponseDto(UUID articleId, String userName, String customId, Str
5355
this.commentCnt = commentCnt;
5456
this.owner = owner;
5557
this.comments = comments;
58+
this.createdAt = createdAt;
5659
}
5760

5861
public static ArticleResponseDto from(Article article, boolean isOwner, ArticleStatsDto stats,
@@ -88,6 +91,7 @@ public static ArticleResponseDto from(Article article, boolean isOwner, ArticleS
8891
.likeCnt(stats.getLikeCnt())
8992
.commentCnt(stats.getCommentCnt())
9093
.owner(isOwner)
94+
.createdAt(article.getCreatedAt())
9195
.build();
9296
}
9397

@@ -113,6 +117,7 @@ public static ArticleResponseDto fromWithoutComments(Article article, boolean is
113117
.likeCnt(stats.getLikeCnt())
114118
.commentCnt(stats.getCommentCnt())
115119
.owner(isOwner)
120+
.createdAt(article.getCreatedAt())
116121
.build();
117122
}
118123
}

0 commit comments

Comments
 (0)