diff --git a/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/AddPlanRequest.kt b/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/AddPlanRequest.kt deleted file mode 100644 index a455c86..0000000 --- a/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/AddPlanRequest.kt +++ /dev/null @@ -1,13 +0,0 @@ -package kr.wooco.woocobe.plan.ui.web.controller.request - -import java.time.LocalDate - -data class AddPlanRequest( - val title: String, - val description: String, - val primaryRegion: String, - val secondaryRegion: String, - val visitDate: LocalDate, - val placeIds: List, - val categories: List, -) diff --git a/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/CreatePlanRequest.kt b/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/CreatePlanRequest.kt new file mode 100644 index 0000000..62ffeaf --- /dev/null +++ b/src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/CreatePlanRequest.kt @@ -0,0 +1,26 @@ +package kr.wooco.woocobe.plan.ui.web.controller.request + +import kr.wooco.woocobe.plan.domain.usecase.AddPlanInput +import java.time.LocalDate + +data class CreatePlanRequest( + val title: String, + val description: String, + val primaryRegion: String, + val secondaryRegion: String, + val visitDate: LocalDate, + val placeIds: List, + val categories: List, +) { + fun toCommand(userId: Long): AddPlanInput = + AddPlanInput( + userId = userId, + title = title, + description = description, + primaryRegion = primaryRegion, + secondaryRegion = secondaryRegion, + visitDate = visitDate, + placeIds = placeIds, + categories = categories, + ) +}