-
Notifications
You must be signed in to change notification settings - Fork 2
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 #357 from tukcomCD2024/ARCH-161-B-feat/group_capsu…
…le_detail feat : 그룹 캡슐 상세 & 요약 조회
- Loading branch information
Showing
37 changed files
with
1,113 additions
and
109 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
24 changes: 24 additions & 0 deletions
24
...te/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleSummaryDto.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,17 +1,41 @@ | ||
package site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.util.function.Function; | ||
import org.locationtech.jts.geom.Point; | ||
import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.response.CapsuleSummaryResponse; | ||
|
||
public record CapsuleSummaryDto( | ||
String nickname, | ||
String profileUrl, | ||
String skinUrl, | ||
String title, | ||
ZonedDateTime dueDate, | ||
Point point, | ||
String address, | ||
String roadName, | ||
Boolean isOpened, | ||
ZonedDateTime createdAt | ||
) { | ||
|
||
public CapsuleSummaryResponse toResponse( | ||
final Function<String, String> preSignUrlFunction, | ||
final Function<Point, Point> changePointFunction | ||
) { | ||
final Point changePoint = changePointFunction.apply(point); | ||
|
||
return CapsuleSummaryResponse.builder() | ||
.nickname(nickname) | ||
.profileUrl(profileUrl) | ||
.skinUrl(preSignUrlFunction.apply(skinUrl)) | ||
.title(title) | ||
.dueDate(dueDate) | ||
.latitude(changePoint.getX()) | ||
.longitude(changePoint.getY()) | ||
.address(address) | ||
.isOpened(isOpened) | ||
.createdAt(createdAt) | ||
.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
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
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
Oops, something went wrong.