From 8903958889b2e8d430b1d939d2a72d45cfed7f6a Mon Sep 17 00:00:00 2001 From: jspark <98972385+JunseoParKK@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:07:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=94=8C=EB=9E=9C=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=9A=94=EC=B2=AD=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20?= =?UTF-8?q?=EB=B0=8F=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/request/AddPlanRequest.kt | 13 ---------- .../controller/request/CreatePlanRequest.kt | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) delete mode 100644 src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/AddPlanRequest.kt create mode 100644 src/main/kotlin/kr/wooco/woocobe/plan/ui/web/controller/request/CreatePlanRequest.kt 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, + ) +}