-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[feat] 게시글 좋아요 / 게시글 댓글 기능 구현
- Loading branch information
Showing
29 changed files
with
1,002 additions
and
78 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
28 changes: 28 additions & 0 deletions
28
src/main/java/com/leets/xcellentbe/domain/article/dto/ArticleStatsDto.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,28 @@ | ||
package com.leets.xcellentbe.domain.article.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class ArticleStatsDto { | ||
private long likeCnt; | ||
private long commentCnt; | ||
private long repostCnt; | ||
|
||
@Builder | ||
private ArticleStatsDto(long likeCnt, long commentCnt, long repostCnt) { | ||
this.likeCnt = likeCnt; | ||
this.commentCnt = commentCnt; | ||
this.repostCnt = repostCnt; | ||
} | ||
|
||
public static ArticleStatsDto from(long likeCnt, long commentCnt, long repostCnt) { | ||
return ArticleStatsDto.builder() | ||
.likeCnt(likeCnt) | ||
.commentCnt(commentCnt) | ||
.repostCnt(repostCnt) | ||
.build(); | ||
} | ||
} |
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
Oops, something went wrong.