-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
164 additions
and
20 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
43 changes: 43 additions & 0 deletions
43
src/main/java/com/jisungin/application/talkroom/response/TalkRoomFindOneResponse.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,43 @@ | ||
package com.jisungin.application.talkroom.response; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class TalkRoomFindOneResponse { | ||
|
||
private Long talkRoomId; | ||
private String userName; | ||
private String title; | ||
private String content; | ||
private String bookName; | ||
private String bookImage; | ||
private List<TalkRoomQueryReadingStatus> readingStatuses = new ArrayList<>(); | ||
private List<TalkRoomQueryComments> comments = new ArrayList<>(); | ||
|
||
@Builder | ||
@QueryProjection | ||
public TalkRoomFindOneResponse(Long talkRoomId, String userName, String title, String content, String bookName, | ||
String bookImage) { | ||
this.talkRoomId = talkRoomId; | ||
this.userName = userName; | ||
this.title = title; | ||
this.content = content; | ||
this.bookName = bookName; | ||
this.bookImage = bookImage; | ||
} | ||
|
||
public void addTalkRoomStatus(List<TalkRoomQueryReadingStatus> readingStatuses) { | ||
this.readingStatuses = readingStatuses; | ||
} | ||
|
||
public void addTalkRoomComments(List<TalkRoomQueryComments> comments) { | ||
this.comments = comments; | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/jisungin/application/talkroom/response/TalkRoomQueryComments.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,24 @@ | ||
package com.jisungin.application.talkroom.response; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class TalkRoomQueryComments { | ||
|
||
private Long commentId; | ||
private String userName; | ||
private String content; | ||
|
||
@Builder | ||
@QueryProjection | ||
public TalkRoomQueryComments(Long commentId, String userName, String content) { | ||
this.commentId = commentId; | ||
this.userName = userName; | ||
this.content = content; | ||
} | ||
|
||
} |
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