-
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 #93 from uju-in/LIME-168-BE-feed-cursor-feat
[LIME-168] 피드 목록 조회 기능 수정
- Loading branch information
Showing
11 changed files
with
138 additions
and
112 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
33 changes: 33 additions & 0 deletions
33
...api/src/main/java/com/programmers/lime/domains/feed/api/request/FeedCursorGetRequest.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,33 @@ | ||
package com.programmers.lime.domains.feed.api.request; | ||
|
||
import com.programmers.lime.common.model.Hobby; | ||
import com.programmers.lime.domains.feed.application.dto.request.FeedGetCursorServiceRequest; | ||
import com.programmers.lime.domains.feed.model.FeedSortCondition; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record FeedCursorGetRequest( | ||
|
||
@Schema(description = "취미 이름", example = "농구") | ||
String hobbyName, | ||
|
||
@Schema(description = "닉네임", example = "test0") | ||
String nickname, | ||
|
||
@Schema(description = "정렬 조건", example = "POPULARITY") | ||
String sortCondition | ||
|
||
) { | ||
public FeedGetCursorServiceRequest toServiceRequest() { | ||
|
||
FeedSortCondition feedSortCondition = FeedSortCondition.from(this.sortCondition); | ||
Hobby hobby = Hobby.from(hobbyName); | ||
|
||
return FeedGetCursorServiceRequest.builder() | ||
.nickname(nickname) | ||
.sortCondition(feedSortCondition) | ||
.hobby(hobby) | ||
.build(); | ||
} | ||
} |
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
5 changes: 3 additions & 2 deletions
5
...om/programmers/lime/domains/feed/application/dto/request/FeedGetCursorServiceRequest.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,13 +1,14 @@ | ||
package com.programmers.lime.domains.feed.application.dto.request; | ||
|
||
import com.programmers.lime.common.model.Hobby; | ||
import com.programmers.lime.domains.feed.model.FeedSortCondition; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record FeedGetCursorServiceRequest( | ||
Long myPageMemberId, | ||
Long loginMemberId, | ||
String nickname, | ||
FeedSortCondition sortCondition, | ||
Hobby hobby | ||
) { | ||
} |
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
8 changes: 8 additions & 0 deletions
8
lime-domain/src/main/java/com/programmers/lime/domains/feed/model/FeedLikeInfo.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,8 @@ | ||
package com.programmers.lime.domains.feed.model; | ||
|
||
public record FeedLikeInfo( | ||
Long feedId, | ||
Long memberId | ||
|
||
) { | ||
} |
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
Oops, something went wrong.