Skip to content

Commit c930d04

Browse files
committed
조회수 추가
1 parent 67a49b8 commit c930d04

File tree

1 file changed

+4
-2
lines changed
  • back/src/main/java/com/back/domain/post/post/dto

1 file changed

+4
-2
lines changed

back/src/main/java/com/back/domain/post/post/dto/PostDto.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88
public record PostDto(
99
Long postId,
1010
String title,
11-
String content
11+
String content,
12+
int viewCount
1213
) {
1314

1415

1516
public static PostDto from(Post post) {
1617
return new PostDto(
1718
post.getId(),
1819
post.getTitle(),
19-
post.getContent()
20+
post.getContent(),
21+
post.getViewCount()
2022
);
2123
}
2224
}

0 commit comments

Comments
 (0)