add notes
This commit is contained in:
@@ -28,6 +28,7 @@ type OrderItemResponse struct {
|
||||
Price float64 `json:"price"`
|
||||
Quantity int `json:"quantity"`
|
||||
Subtotal float64 `json:"subtotal"`
|
||||
Notes string `json:"notes"`
|
||||
}
|
||||
|
||||
func mapToOrderItemResponses(items []entity.OrderItem) []OrderItemResponse {
|
||||
@@ -113,6 +114,7 @@ func MapToOrderItemResponses(items []entity.OrderItem) []OrderItemResponse {
|
||||
Price: item.Price,
|
||||
Quantity: item.Quantity,
|
||||
Subtotal: item.Price * float64(item.Quantity),
|
||||
Notes: item.Notes,
|
||||
})
|
||||
}
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user