Add order items

This commit is contained in:
Aditya Siregar
2025-08-08 22:33:08 +07:00
parent c18e915d1e
commit 8e9c14b860
14 changed files with 427 additions and 200 deletions
+1
View File
@@ -11,6 +11,7 @@ type PaymentOrderItem struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
PaymentID uuid.UUID `gorm:"type:uuid;not null;index" json:"payment_id"`
OrderItemID uuid.UUID `gorm:"type:uuid;not null;index" json:"order_item_id"`
Quantity int `gorm:"not null;default:0" json:"quantity"` // Quantity paid for this specific payment
Amount float64 `gorm:"type:decimal(10,2);not null" json:"amount"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`