Skip to content
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

cafe-01-end 셋팅 #1

Open
wants to merge 1 commit into
base: lecture/cafe-01-start
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/main/kotlin/com/example/config/Routing.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
package com.example.config

import com.example.shared.CafeOrderStatus
import com.example.shared.dto.OrderDto
import com.example.shared.menuList
import io.ktor.server.application.*
import io.ktor.server.request.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import java.time.LocalDateTime


fun Application.configureRouting() {
routing {
get("/") {
call.respondText("Hello World!")
}

route("/api") {
get("/menus") {
val list = menuList
call.respond(list)
}
post("/orders") {
val request = call.receive<OrderDto.CreateRequest>()
val selectedMenu = menuList.first { it.id == request.menuId }
val order = OrderDto.DisplayResponse(
orderCode = "ordercode1",
menuName = selectedMenu.name,
customerName = "홍길동",
price = selectedMenu.price,
status = CafeOrderStatus.READY,
orderedAt = LocalDateTime.now(),
id = 1
)
call.respond(order)
}
get("/orders/{orderCode}") {
val orderCode = call.parameters["orderCode"]!!
val order = OrderDto.DisplayResponse(
orderCode = orderCode,
menuName = "아이스라떼",
customerName = "홍길동",
price = 1000,
status = CafeOrderStatus.READY,
orderedAt = LocalDateTime.now(),
id = 1
)
call.respond(order)
}
}
}
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/example/model/CafeMenu.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.example.domain.model

import com.example.shared.CafeMenuCategory
import kotlinx.serialization.Serializable

@Serializable
data class CafeMenu(
val name: String,
val price: Int,
Expand Down
283 changes: 142 additions & 141 deletions src/main/kotlin/com/example/shared/DummyData.kt
Original file line number Diff line number Diff line change
@@ -1,144 +1,145 @@
package com.example.shared

//val menuList = listOf(
// CafeMenu(
// id = 1,
// name = "아메리카노(HOT)",
// price = 3800,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%86%E1%85%A6%E1%84%85%E1%85%B5%E1%84%8F%E1%85%A1%E1%84%82%E1%85%A9(HOT).jpg"
// ),
// CafeMenu(
// id = 2,
// name = "아메리카노(ICE)",
// price = 3800,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%86%E1%85%A6%E1%84%85%E1%85%B5%E1%84%8F%E1%85%A1%E1%84%82%E1%85%A9(ICE).jpg"
// ),
// CafeMenu(
// id = 3,
// name = "카페라떼(HOT)",
// price = 4500,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A1%E1%84%91%E1%85%A6%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6(HOT)%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 4,
// name = "카페라떼(ICE)",
// price = 4500,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A1%E1%84%91%E1%85%A6%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6(ICE).jpg"
// ),
// CafeMenu(
// id = 5,
// name = "콜드브루",
// price = 7000,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A9%E1%86%AF%E1%84%83%E1%85%B3%E1%84%87%E1%85%B3%E1%84%85%E1%85%AE%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 6,
// name = "아인슈페너",
// price = 5000,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%8B%E1%85%B5%E1%86%AB%E1%84%89%E1%85%B2%E1%84%91%E1%85%A6%E1%84%82%E1%85%A5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 7,
// name = "에스프레소",
// price = 3500,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A6%E1%84%89%E1%85%B3%E1%84%91%E1%85%B3%E1%84%85%E1%85%A6%E1%84%89%E1%85%A9%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 8,
// name = "아포가토",
// price = 6000,
// category = CafeMenuCategory.COFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%91%E1%85%A9%E1%84%80%E1%85%A1%E1%84%90%E1%85%A9%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 9,
// name = "딸기스무디",
// price = 6000,
// category = CafeMenuCategory.NONCOFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%84%E1%85%A1%E1%86%AF%E1%84%80%E1%85%B5%E1%84%89%E1%85%B3%E1%84%86%E1%85%AE%E1%84%83%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 10,
// name = "말차라떼",
// price = 5000,
// category = CafeMenuCategory.NONCOFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%86%E1%85%A1%E1%86%AF%E1%84%8E%E1%85%A1%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6.jpg"
// ),
// CafeMenu(
// id = 11,
// name = "홍차",
// price = 3000,
// category = CafeMenuCategory.NONCOFFEE,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%92%E1%85%A9%E1%86%BC%E1%84%8E%E1%85%A1.jpg"
// ),
// CafeMenu(
// id = 12,
// name = "얼그레이스콘",
// price = 3300,
// category = CafeMenuCategory.BAKERY,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A5%E1%86%AF%E1%84%80%E1%85%B3%E1%84%85%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%89%E1%85%B3%E1%84%8F%E1%85%A9%E1%86%AB%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 13,
// name = "우리밀 치아바타",
// price = 4000,
// category = CafeMenuCategory.BAKERY,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%AE%E1%84%85%E1%85%B5%E1%84%86%E1%85%B5%E1%86%AF%20%E1%84%8E%E1%85%B5%E1%84%8B%E1%85%A1%E1%84%87%E1%85%A1%E1%84%90%E1%85%A1.jpg"
// ),
// CafeMenu(
// id = 14,
// name = "참깨베이글",
// price = 3000,
// category = CafeMenuCategory.BAKERY,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8E%E1%85%A1%E1%86%B7%E1%84%81%E1%85%A2%E1%84%87%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%80%E1%85%B3%E1%86%AF.jpg"
// ),
// CafeMenu(
// id = 15,
// name = "크로아상",
// price = 3500,
// category = CafeMenuCategory.BAKERY,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%B3%E1%84%85%E1%85%A9%E1%84%8B%E1%85%A1%E1%84%89%E1%85%A1%E1%86%BC.jpg"
// ),
// CafeMenu(
// id = 16,
// name = "클럽샌드위치",
// price = 7000,
// category = CafeMenuCategory.BAKERY,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%B3%E1%86%AF%E1%84%85%E1%85%A5%E1%86%B8%E1%84%89%E1%85%A2%E1%86%AB%E1%84%83%E1%85%B3%E1%84%8B%E1%85%B1%E1%84%8E%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 17,
// name = "땅콩초코쿠키",
// price = 2000,
// category = CafeMenuCategory.DESSERT,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%84%E1%85%A1%E1%86%BC%E1%84%8F%E1%85%A9%E1%86%BC%E1%84%8E%E1%85%A9%E1%84%8F%E1%85%A9%E1%84%8F%E1%85%AE%E1%84%8F%E1%85%B5.jpg"
// ),
// CafeMenu(
// id = 18,
// name = "마카롱",
// price = 2000,
// category = CafeMenuCategory.DESSERT,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%86%E1%85%A1%E1%84%8F%E1%85%A1%E1%84%85%E1%85%A9%E1%86%BC.jpg"
// ),
// CafeMenu(
// id = 19,
// name = "꾸덕초코 브라우니", price = 2000,
// category = CafeMenuCategory.DESSERT,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%81%E1%85%AE%E1%84%83%E1%85%A5%E1%86%A8%E1%84%8E%E1%85%A9%E1%84%8F%E1%85%A9%20%E1%84%87%E1%85%B3%E1%84%85%E1%85%A1%E1%84%8B%E1%85%AE%E1%84%82%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
// ),
// CafeMenu(
// id = 20,
// name = "치즈케이크",
// price = 7000,
// category = CafeMenuCategory.DESSERT,
// image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8E%E1%85%B5%E1%84%8C%E1%85%B3%E1%84%8F%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%8F%E1%85%B3.jpg"
// ),
//)
import com.example.domain.model.CafeMenu

val menuList = listOf(
CafeMenu(
id = 1,
name = "아메리카노(HOT)",
price = 3800,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%86%E1%85%A6%E1%84%85%E1%85%B5%E1%84%8F%E1%85%A1%E1%84%82%E1%85%A9(HOT).jpg"
),
CafeMenu(
id = 2,
name = "아메리카노(ICE)",
price = 3800,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%86%E1%85%A6%E1%84%85%E1%85%B5%E1%84%8F%E1%85%A1%E1%84%82%E1%85%A9(ICE).jpg"
),
CafeMenu(
id = 3,
name = "카페라떼(HOT)",
price = 4500,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A1%E1%84%91%E1%85%A6%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6(HOT)%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 4,
name = "카페라떼(ICE)",
price = 4500,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A1%E1%84%91%E1%85%A6%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6(ICE).jpg"
),
CafeMenu(
id = 5,
name = "콜드브루",
price = 7000,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%A9%E1%86%AF%E1%84%83%E1%85%B3%E1%84%87%E1%85%B3%E1%84%85%E1%85%AE%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 6,
name = "아인슈페너",
price = 5000,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%8B%E1%85%B5%E1%86%AB%E1%84%89%E1%85%B2%E1%84%91%E1%85%A6%E1%84%82%E1%85%A5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 7,
name = "에스프레소",
price = 3500,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A6%E1%84%89%E1%85%B3%E1%84%91%E1%85%B3%E1%84%85%E1%85%A6%E1%84%89%E1%85%A9%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 8,
name = "아포가토",
price = 6000,
category = CafeMenuCategory.COFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A1%E1%84%91%E1%85%A9%E1%84%80%E1%85%A1%E1%84%90%E1%85%A9%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 9,
name = "딸기스무디",
price = 6000,
category = CafeMenuCategory.NONCOFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%84%E1%85%A1%E1%86%AF%E1%84%80%E1%85%B5%E1%84%89%E1%85%B3%E1%84%86%E1%85%AE%E1%84%83%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 10,
name = "말차라떼",
price = 5000,
category = CafeMenuCategory.NONCOFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%86%E1%85%A1%E1%86%AF%E1%84%8E%E1%85%A1%E1%84%85%E1%85%A1%E1%84%84%E1%85%A6.jpg"
),
CafeMenu(
id = 11,
name = "홍차",
price = 3000,
category = CafeMenuCategory.NONCOFFEE,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%92%E1%85%A9%E1%86%BC%E1%84%8E%E1%85%A1.jpg"
),
CafeMenu(
id = 12,
name = "얼그레이스콘",
price = 3300,
category = CafeMenuCategory.BAKERY,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%A5%E1%86%AF%E1%84%80%E1%85%B3%E1%84%85%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%89%E1%85%B3%E1%84%8F%E1%85%A9%E1%86%AB%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 13,
name = "우리밀 치아바타",
price = 4000,
category = CafeMenuCategory.BAKERY,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8B%E1%85%AE%E1%84%85%E1%85%B5%E1%84%86%E1%85%B5%E1%86%AF%20%E1%84%8E%E1%85%B5%E1%84%8B%E1%85%A1%E1%84%87%E1%85%A1%E1%84%90%E1%85%A1.jpg"
),
CafeMenu(
id = 14,
name = "참깨베이글",
price = 3000,
category = CafeMenuCategory.BAKERY,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8E%E1%85%A1%E1%86%B7%E1%84%81%E1%85%A2%E1%84%87%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%80%E1%85%B3%E1%86%AF.jpg"
),
CafeMenu(
id = 15,
name = "크로아상",
price = 3500,
category = CafeMenuCategory.BAKERY,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%B3%E1%84%85%E1%85%A9%E1%84%8B%E1%85%A1%E1%84%89%E1%85%A1%E1%86%BC.jpg"
),
CafeMenu(
id = 16,
name = "클럽샌드위치",
price = 7000,
category = CafeMenuCategory.BAKERY,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8F%E1%85%B3%E1%86%AF%E1%84%85%E1%85%A5%E1%86%B8%E1%84%89%E1%85%A2%E1%86%AB%E1%84%83%E1%85%B3%E1%84%8B%E1%85%B1%E1%84%8E%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 17,
name = "땅콩초코쿠키",
price = 2000,
category = CafeMenuCategory.DESSERT,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%84%E1%85%A1%E1%86%BC%E1%84%8F%E1%85%A9%E1%86%BC%E1%84%8E%E1%85%A9%E1%84%8F%E1%85%A9%E1%84%8F%E1%85%AE%E1%84%8F%E1%85%B5.jpg"
),
CafeMenu(
id = 18,
name = "마카롱",
price = 2000,
category = CafeMenuCategory.DESSERT,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%86%E1%85%A1%E1%84%8F%E1%85%A1%E1%84%85%E1%85%A9%E1%86%BC.jpg"
),
CafeMenu(
id = 19,
name = "꾸덕초코 브라우니", price = 2000,
category = CafeMenuCategory.DESSERT,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%81%E1%85%AE%E1%84%83%E1%85%A5%E1%86%A8%E1%84%8E%E1%85%A9%E1%84%8F%E1%85%A9%20%E1%84%87%E1%85%B3%E1%84%85%E1%85%A1%E1%84%8B%E1%85%AE%E1%84%82%E1%85%B5%20%E1%84%91%E1%85%A7%E1%86%AB%E1%84%8C%E1%85%B5%E1%86%B8.png"
),
CafeMenu(
id = 20,
name = "치즈케이크",
price = 7000,
category = CafeMenuCategory.DESSERT,
image = "https://bucket-ogntr9.s3.ap-northeast-2.amazonaws.com/%EC%B9%B4%ED%8E%98%EB%A9%94%EB%89%B4/%E1%84%8E%E1%85%B5%E1%84%8C%E1%85%B3%E1%84%8F%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%8F%E1%85%B3.jpg"
),
)
5 changes: 5 additions & 0 deletions src/main/kotlin/com/example/shared/dto/OrderDto.kt
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
package com.example.shared.dto

import com.example.shared.CafeOrderStatus
import com.example.shared.LocalDateTimeSerializer
import kotlinx.serialization.Serializable
import java.time.LocalDateTime

class OrderDto {
@Serializable
data class CreateRequest(val menuId: Long)

@Serializable
data class DisplayResponse(
val orderCode: String,
val menuName: String,
val customerName: String,
val price: Int,
var status: CafeOrderStatus,
@Serializable(with = LocalDateTimeSerializer::class)
val orderedAt: LocalDateTime,
var id: Long? = null,
)
Expand Down