Skip to content

Commit

Permalink
[feat] link 필드 추가 - #478
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarlgnszx committed Jan 30, 2025
1 parent 23c6acf commit cff289d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ public class CoffeeChatResponse {
private String bio;
private List<String> topicTypeList;
private String profileImage;
private String link;
private String name;
private String career;
private String organization;
private String companyJob;
private List<String> soptActivities;
private String currentSoptActivity;

public static CoffeeChatResponse of(PlayGroundCoffeeChatResponse playGroundCoffeeChatResponse, String currentSoptActivity) {
public static CoffeeChatResponse of(PlayGroundCoffeeChatResponse playGroundCoffeeChatResponse, String currentSoptActivity,String link) {
List<String> updatedSoptActivities = new ArrayList<>(playGroundCoffeeChatResponse.soptActivities());
if (currentSoptActivity != null) {
updatedSoptActivities.remove(currentSoptActivity);
Expand All @@ -31,6 +32,7 @@ public static CoffeeChatResponse of(PlayGroundCoffeeChatResponse playGroundCoffe
.topicTypeList(playGroundCoffeeChatResponse.topicTypeList())
.profileImage(playGroundCoffeeChatResponse.profileImage())
.name(playGroundCoffeeChatResponse.name())
.link(link)
.career(playGroundCoffeeChatResponse.career().equals("아직 없어요") ? null : playGroundCoffeeChatResponse.career())
.organization(playGroundCoffeeChatResponse.organization())
.companyJob(playGroundCoffeeChatResponse.companyJob())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ public class EmploymentPostResponse implements PostWithMemberInfo {
private String name;
private String title;
private String content;
private String link;
private List<String> images;

public static EmploymentPostResponse of(EmploymentPost employmentPost) {
public static EmploymentPostResponse of(EmploymentPost employmentPost, String link) {
return EmploymentPostResponse.builder()
.id(employmentPost.id())
.categoryName(employmentPost.categoryName())
.link(link)
.title(employmentPost.title())
.content(employmentPost.content())
.images(employmentPost.images())
Expand All @@ -40,6 +42,7 @@ public EmploymentPostResponse withMemberDetail(String name, String profileImage)
.title(this.title)
.content(this.content)
.images(this.images)
.link(this.link)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.sopt.app.application.playground.dto.PlaygroundPostInfo.PlaygroundPostResponse;
import org.sopt.app.application.playground.dto.PostWithMemberInfo;

Expand All @@ -18,14 +19,17 @@ public class RecentPostsResponse implements PostWithMemberInfo {
private String name;
private String category;
private String content;
@Setter
private String link;
private Boolean isHotPost;


public static RecentPostsResponse of(PlaygroundPostResponse playgroundPostResponse) {
public static RecentPostsResponse of(PlaygroundPostResponse playgroundPostResponse,String link) {
return RecentPostsResponse.builder()
.id(playgroundPostResponse.postId())
.title(playgroundPostResponse.title())
.category("HOT")
.link(link)
.content(playgroundPostResponse.content())
.isHotPost(true)
.build();
Expand All @@ -37,6 +41,7 @@ public RecentPostsResponse withMemberDetail(String name, String profileImage) {
.title(this.title)
.profileImage(profileImage)
.name(name)
.link(this.link)
.category(this.category)
.content(this.content)
.isHotPost(this.isHotPost)
Expand Down

0 comments on commit cff289d

Please sign in to comment.