-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] 체크리스트 목록 조회 시 지하철 json 형태를 변경한다. (#896)
- Loading branch information
1 parent
5cece98
commit c507458
Showing
5 changed files
with
78 additions
and
0 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
27 changes: 27 additions & 0 deletions
27
...ggood/src/main/java/com/bang_ggood/checklist/dto/response/ChecklistPreviewResponseV1.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,27 @@ | ||
package com.bang_ggood.checklist.dto.response; | ||
|
||
import com.bang_ggood.checklist.domain.Checklist; | ||
import com.bang_ggood.station.dto.response.SubwayStationResponse; | ||
import java.time.LocalDateTime; | ||
|
||
public record ChecklistPreviewResponseV1( | ||
Long checklistId, String roomName, String address, String buildingName, | ||
SubwayStationResponse station, Integer walkingTime, | ||
Integer deposit, Integer rent, LocalDateTime createdAt, | ||
String summary, boolean isLiked) { | ||
|
||
public static ChecklistPreviewResponseV1 of(Checklist checklist, SubwayStationResponse station, boolean isLiked) { | ||
return new ChecklistPreviewResponseV1( | ||
checklist.getId(), | ||
checklist.getRoomName(), | ||
checklist.getRoomAddress(), | ||
checklist.getRoomBuildingName(), | ||
station, | ||
checklist.getRoomWalkingTime(), | ||
checklist.getDeposit(), | ||
checklist.getRent(), | ||
checklist.getCreatedAt(), | ||
checklist.getSummary(), | ||
isLiked); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...good/src/main/java/com/bang_ggood/checklist/dto/response/ChecklistsPreviewResponseV1.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,10 @@ | ||
package com.bang_ggood.checklist.dto.response; | ||
|
||
import java.util.List; | ||
|
||
public record ChecklistsPreviewResponseV1(List<ChecklistPreviewResponseV1> checklists) { | ||
|
||
public static ChecklistsPreviewResponseV1 from(List<ChecklistPreviewResponseV1> checklists) { | ||
return new ChecklistsPreviewResponseV1(checklists); | ||
} | ||
} |
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