-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- id 필드 추가 #1397
- Loading branch information
amaran-th
committed
Jul 30, 2023
1 parent
b0fe580
commit 528818c
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
9 changes: 4 additions & 5 deletions
9
backend/src/main/java/wooteco/prolog/roadmap/application/dto/RecommendedPostResponse.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,18 +1,17 @@ | ||
package wooteco.prolog.roadmap.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import wooteco.prolog.roadmap.domain.RecommendedPost; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
public class RecommendedPostResponse { | ||
|
||
private final Long id; | ||
private final String url; | ||
|
||
public RecommendedPostResponse(final String url) { | ||
this.url = url; | ||
} | ||
|
||
public static RecommendedPostResponse from(final RecommendedPost recommendedPost) { | ||
return new RecommendedPostResponse(recommendedPost.getUrl()); | ||
return new RecommendedPostResponse(recommendedPost.getId(), recommendedPost.getUrl()); | ||
} | ||
} |