Customer Order

This commit is contained in:
aditya.siregar
2024-08-04 01:16:25 +07:00
parent 265dd9b6e8
commit bdf930445c
30 changed files with 832 additions and 43 deletions
+21
View File
@@ -124,3 +124,24 @@ type PaymentDistribution struct {
PaymentType string `json:"payment_type"`
Count int `json:"count"`
}
type OrderDetail struct {
ID int64 `json:"id"` // Order ID
QRCode string `json:"qr_code"` // QR code data (can be a URL or base64 string)
FullName string `json:"full_name"` // Customer's full name
Email string `json:"email"` // Customer's email address
PhoneNumber string `json:"phone_number"` // Customer's phone number
OrderItems []OrderDetailItem `json:"order_items"` // List of ordered items
TotalAmount float64 `json:"total_amount"` // Total amount paid
CreatedAt time.Time `json:"created_at"` // Order creation time
Status string `json:"status"`
PaymentLink string `json:"payment_link"`
}
type OrderDetailItem struct {
ItemType string `json:"item_type"`
Description string `json:"description"`
Quantity int `json:"quantity"` // Quantity of the item
UnitPrice float64 `json:"unit_price"` // Price per unit
TotalPrice float64 `json:"total_price"` // Total price for this item (Quantity * UnitPrice)
}