-
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 #77 from Team-Going/feature/73
[feat] 여행 친구 전체 조회 API 구현
- Loading branch information
Showing
5 changed files
with
109 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
doorip-api/src/main/java/org/doorip/trip/dto/response/TripParticipantGetResponse.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,22 @@ | ||
package org.doorip.trip.dto.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import org.doorip.trip.domain.Participant; | ||
|
||
import java.util.List; | ||
|
||
@Builder(access = AccessLevel.PRIVATE) | ||
public record TripParticipantGetResponse( | ||
List<TripParticipantResponse> participants, | ||
List<TripStyleResponse> styles | ||
) { | ||
public static TripParticipantGetResponse of(List<Participant> participants, List<TripStyleResponse> styles) { | ||
return TripParticipantGetResponse.builder() | ||
.participants(participants.stream() | ||
.map(TripParticipantResponse::of) | ||
.toList()) | ||
.styles(styles) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
doorip-api/src/main/java/org/doorip/trip/dto/response/TripStyleResponse.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.doorip.trip.dto.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
|
||
@Builder(access = AccessLevel.PRIVATE) | ||
public record TripStyleResponse( | ||
int rate, | ||
boolean isLeft | ||
) { | ||
public static TripStyleResponse of(int rate, boolean isLeft) { | ||
return TripStyleResponse.builder() | ||
.rate(rate) | ||
.isLeft(isLeft) | ||
.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