-
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.
Merge pull request #54 from YAPP-Github/feat/PC-580-profile-talk-guides
[PC-580] 프로필 가치관 톡 조회 응답 형식 변경
- Loading branch information
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
20 changes: 14 additions & 6 deletions
20
...src/main/java/org/yapp/domain/profile/presentation/response/ProfileValueTalkResponse.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,22 +1,30 @@ | ||
package org.yapp.domain.profile.presentation.response; | ||
|
||
import java.util.List; | ||
import org.yapp.core.domain.profile.ProfileValueTalk; | ||
import org.yapp.core.domain.value.ValueTalk; | ||
|
||
public record ProfileValueTalkResponse( | ||
String title, | ||
String category, | ||
Long profileValueTalkId, | ||
String answer, | ||
String summary | ||
String summary, | ||
String placeholder, | ||
List<String> guides | ||
) { | ||
|
||
public ProfileValueTalkResponse(ProfileValueTalk profileValueTalk) { | ||
this( | ||
profileValueTalk.getValueTalk().getTitle(), | ||
profileValueTalk.getValueTalk().getCategory(), | ||
public static ProfileValueTalkResponse from(ProfileValueTalk profileValueTalk) { | ||
ValueTalk valueTalk = profileValueTalk.getValueTalk(); | ||
|
||
return new ProfileValueTalkResponse( | ||
valueTalk.getTitle(), | ||
valueTalk.getCategory(), | ||
profileValueTalk.getId(), | ||
profileValueTalk.getAnswer(), | ||
profileValueTalk.getSummary() | ||
profileValueTalk.getSummary(), | ||
valueTalk.getPlaceholder(), | ||
valueTalk.getGuides() | ||
); | ||
} | ||
} |
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