-
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.
Showing
5 changed files
with
197 additions
and
0 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
36 changes: 36 additions & 0 deletions
36
...ontbe/www/DontBeServer/api/content/dto/response/ContentGetAllByMemberResponseDtoVer2.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,36 @@ | ||
package com.dontbe.www.DontBeServer.api.content.dto.response; | ||
|
||
import com.dontbe.www.DontBeServer.api.content.domain.Content; | ||
import com.dontbe.www.DontBeServer.api.member.domain.Member; | ||
|
||
public record ContentGetAllByMemberResponseDtoVer2( | ||
Long memberId, | ||
String memberProfileUrl, | ||
String memberNickname, | ||
Long contentId, | ||
String contentText, | ||
String time, | ||
boolean isGhost, | ||
int memberGhost, | ||
boolean isLiked, | ||
int likedNumber, | ||
int commentNumber, | ||
String contentImageUrl | ||
) { | ||
public static ContentGetAllByMemberResponseDtoVer2 of(Member writerMember, int writerGhost, Content content, boolean isGhost, boolean isLiked, String time, int likedNumber, int commentNumber) { | ||
return new ContentGetAllByMemberResponseDtoVer2( | ||
writerMember.getId(), | ||
writerMember.getProfileUrl(), | ||
writerMember.getNickname(), | ||
content.getId(), | ||
content.getContentText(), | ||
time, | ||
isGhost, | ||
writerGhost, | ||
isLiked, | ||
likedNumber, | ||
commentNumber, | ||
content.getContentImage() | ||
); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...va/com/dontbe/www/DontBeServer/api/content/dto/response/ContentGetAllResponseDtoVer3.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,38 @@ | ||
package com.dontbe.www.DontBeServer.api.content.dto.response; | ||
|
||
import com.dontbe.www.DontBeServer.api.content.domain.Content; | ||
import com.dontbe.www.DontBeServer.api.member.domain.Member; | ||
|
||
public record ContentGetAllResponseDtoVer3( | ||
Long memberId, | ||
String memberProfileUrl, | ||
String memberNickname, | ||
Long contentId, | ||
String contentText, | ||
String time, | ||
boolean isGhost, | ||
int memberGhost, | ||
boolean isLiked, | ||
int likedNumber, | ||
int commentNumber, | ||
Boolean isDeleted, | ||
String contentImageUrl | ||
) { | ||
public static ContentGetAllResponseDtoVer3 of(Member writerMember, Content content, boolean isGhost, int refinedMemberGhost, boolean isLiked, String time, int likedNumber, int commentNumber) { | ||
return new ContentGetAllResponseDtoVer3( | ||
writerMember.getId(), | ||
writerMember.getProfileUrl(), | ||
writerMember.getNickname(), | ||
content.getId(), | ||
content.getContentText(), | ||
time, | ||
isGhost, | ||
refinedMemberGhost, | ||
isLiked, | ||
likedNumber, | ||
commentNumber, | ||
writerMember.isDeleted(), | ||
content.getContentImage() | ||
); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...om/dontbe/www/DontBeServer/api/content/dto/response/ContentGetDetailsResponseDtoVer3.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,36 @@ | ||
package com.dontbe.www.DontBeServer.api.content.dto.response; | ||
|
||
import com.dontbe.www.DontBeServer.api.content.domain.Content; | ||
import com.dontbe.www.DontBeServer.api.member.domain.Member; | ||
|
||
public record ContentGetDetailsResponseDtoVer3( | ||
Long memberId, | ||
String memberProfileUrl, | ||
String memberNickname, | ||
boolean isGhost, | ||
int memberGhost, | ||
boolean isLiked, | ||
String time, | ||
int likedNumber, | ||
int commentNumber, | ||
String contentText, | ||
Boolean isDeleted, | ||
String contentImageUrl | ||
) { | ||
public static ContentGetDetailsResponseDtoVer3 of(Member member, int memberGhost, Content content, boolean isGhost, boolean isLiked, String time, int likedNumber, int commentNumber) { | ||
return new ContentGetDetailsResponseDtoVer3( | ||
member.getId(), | ||
member.getProfileUrl(), | ||
member.getNickname(), | ||
isGhost, | ||
memberGhost, | ||
isLiked, | ||
time, | ||
likedNumber, | ||
commentNumber, | ||
content.getContentText(), | ||
member.isDeleted(), | ||
content.getContentImage() | ||
); | ||
} | ||
} |
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