update order response

This commit is contained in:
Efril
2026-05-25 20:28:24 +07:00
parent d0378b5ac4
commit 957c1ae53d
6 changed files with 22 additions and 25 deletions
+8
View File
@@ -134,6 +134,14 @@ func OrderItemEntityToResponse(item *entities.OrderItem) *models.OrderItemRespon
if item.Product.ID != uuid.Nil {
response.ProductName = item.Product.Name
if item.Product.CategoryID != uuid.Nil {
categoryID := item.Product.CategoryID
response.CategoryID = &categoryID
}
if item.Product.Category.ID != uuid.Nil {
categoryName := item.Product.Category.Name
response.CategoryName = &categoryName
}
}
if item.ProductVariant != nil {