-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ 역 즐겨찾기 우선순위 적용 (#339) #340
Changes from 1 commit
39b0974
dd1475e
1ae954c
72387f7
2e55ab6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package backend.team.ahachul_backend.api.member.adapter.web.`in`.dto | ||
|
||
import backend.team.ahachul_backend.api.member.application.command.BookmarkStationCommand | ||
import backend.team.ahachul_backend.api.member.application.command.BookmarkStationCommands | ||
|
||
class BookmarkStationDto { | ||
|
||
data class Request( | ||
val stationNames: List<String> | ||
val stations: List<BookmarkStation> | ||
) { | ||
fun toCommand(): BookmarkStationCommand { | ||
return BookmarkStationCommand( | ||
stationNames = stationNames.toMutableList() | ||
fun toCommand(): BookmarkStationCommands { | ||
return BookmarkStationCommands( | ||
stations.map { BookmarkStationCommand(it.stationName, it.label) } | ||
) | ||
} | ||
} | ||
|
||
data class Response( | ||
val memberStationIds: List<Long> | ||
) | ||
|
||
data class BookmarkStation( | ||
val stationName: String, | ||
val label: String?, | ||
) | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ class GetBookmarkStationDto { | |
data class StationInfo( | ||
val stationId: Long, | ||
val stationName: String, | ||
val label: String?, | ||
val subwayLineInfoList: List<SubwayLineInfo> | ||
) | ||
Comment on lines
9
to
14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 조회 API 응답 스펙에도 |
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
package backend.team.ahachul_backend.api.member.application.command | ||
|
||
import backend.team.ahachul_backend.common.exception.BusinessException | ||
import backend.team.ahachul_backend.common.response.ResponseCode | ||
|
||
data class BookmarkStationCommand( | ||
val stationNames: MutableList<String> | ||
) { | ||
init { | ||
if (stationNames.size > MAX_STATION_COUNT) { | ||
throw BusinessException(ResponseCode.EXCEED_MAXIMUM_STATION_COUNT) | ||
} | ||
} | ||
|
||
companion object { | ||
const val MAX_STATION_COUNT = 3 | ||
} | ||
} | ||
val stationName: String, | ||
val label: String? | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package backend.team.ahachul_backend.api.member.application.command | ||
|
||
import backend.team.ahachul_backend.common.exception.BusinessException | ||
import backend.team.ahachul_backend.common.response.ResponseCode | ||
|
||
data class BookmarkStationCommands( | ||
val stations: List<BookmarkStationCommand> | ||
) { | ||
init { | ||
if (stations.size > MAX_STATION_COUNT) { | ||
throw BusinessException(ResponseCode.EXCEED_MAXIMUM_STATION_COUNT) | ||
} | ||
} | ||
|
||
companion object { | ||
const val MAX_STATION_COUNT = 4 | ||
} | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 최대 가능 개수를 4로 확장하였습니다. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE tb_member_station | ||
ADD COLUMN label VARCHAR(100) NULL AFTER member_station_id; | ||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 즐겨찾기 역 라벨 컬럼을 추가하였습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존의
BookmarkStationCommand
를BookmarkStationCommands
로 변경하고,BookmarkStationCommand
를 새롭게 작성하였습니다.이에 따른 API 요청 스펙을 변경하였습니다.
stationNames
👉stations