Skip to content

Commit

Permalink
Merge pull request #119 from mash-up-kr/fix/schedule-place-all
Browse files Browse the repository at this point in the history
fix: 모든 장소 조회 시, Schedule ID/Name 반환
  • Loading branch information
KimDoubleB authored Jul 31, 2024
2 parents 4868029 + f431a5a commit 97eab93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class PlaceService(
.map { (scheduleId, places) ->
val schedule = scheduleById[scheduleId] ?: throw PiikiiException(ExceptionCode.NOT_FOUNDED)
ScheduleTypeGroupResponse(
scheduleType = schedule.type,
scheduleId = scheduleId,
scheduleName = schedule.name,
places = places.map { place -> PlaceResponse(place = place) },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.piikii.application.port.input.dto.response
import com.piikii.application.domain.generic.Origin
import com.piikii.application.domain.generic.ThumbnailLinks
import com.piikii.application.domain.place.Place
import com.piikii.application.domain.schedule.ScheduleType
import io.swagger.v3.oas.annotations.media.Schema
import java.util.UUID

Expand Down Expand Up @@ -57,17 +56,10 @@ data class PlaceResponse(

@Schema(description = "일정 타입별 장소 그룹 응답")
data class ScheduleTypeGroupResponse(
@field:Schema(
description = "스케줄 타입",
allowableValues = [
"ARCADE",
"DISH",
"DESSERT",
"ALCOHOL",
],
example = "DISH",
)
val scheduleType: ScheduleType,
@field:Schema(description = "일정타입(Schedule) ID", example = "1")
val scheduleId: Long,
@field:Schema(description = "일정 이름", example = "술 2차")
val scheduleName: String,
@field:Schema(description = "해당 일정 타입에 속한 장소 목록")
val places: List<PlaceResponse>,
)

0 comments on commit 97eab93

Please sign in to comment.