From 256c39a10ed6dcd547dd02d849b3cc9d5778a6cc Mon Sep 17 00:00:00 2001 From: Ogu1208 Date: Sun, 22 Sep 2024 16:12:21 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20item=5Fattribute=EC=9D=98=20name?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=9D=B4=EB=A6=84=EC=9D=84=20option?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD,=20=EC=BB=AC=EB=9F=BC?= =?UTF-8?q?=20=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/store/clothstar/product/domain/ItemAttribute.kt | 4 ++-- .../store/clothstar/product/dto/response/ProductResponse.kt | 2 +- .../kotlin/org/store/clothstar/product/service/ItemService.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/org/store/clothstar/product/domain/ItemAttribute.kt b/src/main/kotlin/org/store/clothstar/product/domain/ItemAttribute.kt index 505038a..e2d5dd1 100644 --- a/src/main/kotlin/org/store/clothstar/product/domain/ItemAttribute.kt +++ b/src/main/kotlin/org/store/clothstar/product/domain/ItemAttribute.kt @@ -8,7 +8,7 @@ import jakarta.persistence.Embeddable @Embeddable data class ItemAttribute( var optionId: Long, - var name: String, - var value: String, + var option: String, var valueId: Long, + var value: String, ) \ No newline at end of file diff --git a/src/main/kotlin/org/store/clothstar/product/dto/response/ProductResponse.kt b/src/main/kotlin/org/store/clothstar/product/dto/response/ProductResponse.kt index 122e9f2..91d30d5 100644 --- a/src/main/kotlin/org/store/clothstar/product/dto/response/ProductResponse.kt +++ b/src/main/kotlin/org/store/clothstar/product/dto/response/ProductResponse.kt @@ -138,7 +138,7 @@ class ItemAttributeResponse( fun from(attribute: ItemAttribute): ItemAttributeResponse { return ItemAttributeResponse( optionId = attribute.optionId, - name = attribute.name, + name = attribute.option, value = attribute.value, valueId = attribute.valueId ) diff --git a/src/main/kotlin/org/store/clothstar/product/service/ItemService.kt b/src/main/kotlin/org/store/clothstar/product/service/ItemService.kt index 6fccbb6..fac253c 100644 --- a/src/main/kotlin/org/store/clothstar/product/service/ItemService.kt +++ b/src/main/kotlin/org/store/clothstar/product/service/ItemService.kt @@ -58,7 +58,7 @@ class ItemService( attributes = optionValues.map { optionValue -> ItemAttribute( optionId = optionValue.productOption.productOptionId!!, - name = optionValue.productOption.optionName, + option = optionValue.productOption.optionName, value = optionValue.value, valueId = optionValue.optionValueId!! )