-
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.
Merge pull request #44 from DEPthes/develop
[DEPLOY]
- Loading branch information
Showing
6 changed files
with
84 additions
and
40 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
41 changes: 30 additions & 11 deletions
41
src/main/java/depth/mvp/ns/domain/theme/dto/response/ThemeListRes.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 |
---|---|---|
@@ -1,26 +1,45 @@ | ||
package depth.mvp.ns.domain.theme.dto.response; | ||
|
||
import depth.mvp.ns.global.payload.PageInfo; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.time.format.DateTimeFormatter; | ||
import java.util.List; | ||
|
||
@Getter | ||
public class ThemeListRes { | ||
private Long themeId; // 주제ID | ||
private String content; // 주제 내용 | ||
private String date; // 주제 발행일 | ||
private int likeCount; // 주제 좋아요수 | ||
private int boardCount; // 게시글 수 | ||
private Long userId; // 회원ID | ||
private PageInfo pageInfo; // 페이지 정보 | ||
private List<ThemeList> themeList; // 주제 목록 | ||
|
||
@Builder | ||
ThemeListRes(Long themeId, String content, LocalDate date, int likeCount, int boardCount){ | ||
this.themeId = themeId; | ||
this.content = content; | ||
this.date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd")); | ||
this.likeCount = likeCount; | ||
this.boardCount = boardCount; | ||
public ThemeListRes(Long userId, PageInfo pageInfo, List<ThemeList> themeList){ | ||
this.userId = userId; | ||
this.pageInfo = pageInfo; | ||
this.themeList = themeList; | ||
} | ||
|
||
@Getter | ||
public static class ThemeList { | ||
private Long themeId; // 주제ID | ||
private String content; // 주제 내용 | ||
private String date; // 주제 발행일 | ||
private int likeCount; // 주제 좋아요수 | ||
private int boardCount; // 게시글 수 | ||
private boolean likedTheme; // 주제 좋아요 여부 | ||
|
||
@Builder | ||
public ThemeList(Long themeId, String content, LocalDate date, int likeCount, int boardCount, boolean likedTheme) { | ||
this.themeId = themeId; | ||
this.content = content; | ||
this.date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd")); | ||
this.likeCount = likeCount; | ||
this.boardCount = boardCount; | ||
this.likedTheme = likedTheme; | ||
} | ||
} | ||
|
||
} | ||
|
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