Add order items
This commit is contained in:
@@ -65,6 +65,7 @@ type PaymentOrderItem struct {
|
||||
ID uuid.UUID
|
||||
PaymentID uuid.UUID
|
||||
OrderItemID uuid.UUID
|
||||
Quantity int // Quantity paid for this specific payment
|
||||
Amount float64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
@@ -114,6 +115,7 @@ type UpdateOrderRequest struct {
|
||||
|
||||
type CreatePaymentOrderItemRequest struct {
|
||||
OrderItemID uuid.UUID `validate:"required"`
|
||||
Quantity int `validate:"required,min=1"` // Quantity being paid for
|
||||
Amount float64 `validate:"required,min=0"`
|
||||
}
|
||||
|
||||
@@ -205,12 +207,14 @@ type OrderItemResponse struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
PrinterType string
|
||||
PaidQuantity int
|
||||
}
|
||||
|
||||
type PaymentOrderItemResponse struct {
|
||||
ID uuid.UUID
|
||||
PaymentID uuid.UUID
|
||||
OrderItemID uuid.UUID
|
||||
Quantity int // Quantity paid for this specific payment
|
||||
Amount float64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
|
||||
Reference in New Issue
Block a user