-
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.
Showing
6 changed files
with
125 additions
and
11 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
17 changes: 17 additions & 0 deletions
17
src/main/java/org/sopt/app/application/playground/dto/PlayGroundPostCategory.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,17 @@ | ||
package org.sopt.app.application.playground.dto; | ||
|
||
public enum PlayGroundPostCategory { | ||
SOPT_ACTIVITY("SOPT 활동"), | ||
FREE("자유"), | ||
PART("파트"); | ||
private final String displayName; | ||
|
||
PlayGroundPostCategory(String displayName) { | ||
this.displayName = displayName; | ||
} | ||
|
||
public String getDisplayName() { | ||
return displayName; | ||
} | ||
} | ||
|
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
29 changes: 29 additions & 0 deletions
29
src/main/java/org/sopt/app/presentation/home/response/RecentPostsResponse.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,29 @@ | ||
package org.sopt.app.presentation.home.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.sopt.app.application.playground.dto.PlaygroundPostInfo.PlaygroundPostResponse; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RecentPostsResponse { | ||
private Long id; | ||
private String title; | ||
private String category; | ||
private String content; | ||
private boolean isHotPost; | ||
|
||
public static RecentPostsResponse of(PlaygroundPostResponse playgroundPostResponse) { | ||
return RecentPostsResponse.builder() | ||
.id(playgroundPostResponse.postId()) | ||
.title(playgroundPostResponse.title()) | ||
.category("HOT") | ||
.content(playgroundPostResponse.content()) | ||
.isHotPost(true) | ||
.build(); | ||
} | ||
} |