Fix Split Bill
This commit is contained in:
+63
-57
@@ -8,33 +8,34 @@ import (
|
||||
)
|
||||
|
||||
type Order struct {
|
||||
ID uuid.UUID
|
||||
OrganizationID uuid.UUID
|
||||
OutletID uuid.UUID
|
||||
UserID uuid.UUID
|
||||
CustomerID *uuid.UUID
|
||||
OrderNumber string
|
||||
TableNumber *string
|
||||
OrderType constants.OrderType
|
||||
Status constants.OrderStatus
|
||||
Subtotal float64
|
||||
TaxAmount float64
|
||||
DiscountAmount float64
|
||||
TotalAmount float64
|
||||
TotalCost float64
|
||||
PaymentStatus constants.PaymentStatus
|
||||
RefundAmount float64
|
||||
IsVoid bool
|
||||
IsRefund bool
|
||||
VoidReason *string
|
||||
VoidedAt *time.Time
|
||||
VoidedBy *uuid.UUID
|
||||
RefundReason *string
|
||||
RefundedAt *time.Time
|
||||
RefundedBy *uuid.UUID
|
||||
Metadata map[string]interface{}
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
ID uuid.UUID
|
||||
OrganizationID uuid.UUID
|
||||
OutletID uuid.UUID
|
||||
UserID uuid.UUID
|
||||
CustomerID *uuid.UUID
|
||||
OrderNumber string
|
||||
TableNumber *string
|
||||
OrderType constants.OrderType
|
||||
Status constants.OrderStatus
|
||||
Subtotal float64
|
||||
TaxAmount float64
|
||||
DiscountAmount float64
|
||||
TotalAmount float64
|
||||
TotalCost float64
|
||||
RemainingAmount float64
|
||||
PaymentStatus constants.PaymentStatus
|
||||
RefundAmount float64
|
||||
IsVoid bool
|
||||
IsRefund bool
|
||||
VoidReason *string
|
||||
VoidedAt *time.Time
|
||||
VoidedBy *uuid.UUID
|
||||
RefundReason *string
|
||||
RefundedAt *time.Time
|
||||
RefundedBy *uuid.UUID
|
||||
Metadata map[string]interface{}
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type OrderItem struct {
|
||||
@@ -142,36 +143,40 @@ type RefundOrderItemRequest struct {
|
||||
|
||||
// Response DTOs
|
||||
type OrderResponse struct {
|
||||
ID uuid.UUID
|
||||
OrganizationID uuid.UUID
|
||||
OutletID uuid.UUID
|
||||
UserID uuid.UUID
|
||||
CustomerID *uuid.UUID
|
||||
OrderNumber string
|
||||
TableNumber *string
|
||||
OrderType constants.OrderType
|
||||
Status constants.OrderStatus
|
||||
Subtotal float64
|
||||
TaxAmount float64
|
||||
DiscountAmount float64
|
||||
TotalAmount float64
|
||||
TotalCost float64
|
||||
PaymentStatus constants.PaymentStatus
|
||||
RefundAmount float64
|
||||
IsVoid bool
|
||||
IsRefund bool
|
||||
VoidReason *string
|
||||
VoidedAt *time.Time
|
||||
VoidedBy *uuid.UUID
|
||||
RefundReason *string
|
||||
RefundedAt *time.Time
|
||||
RefundedBy *uuid.UUID
|
||||
Notes *string
|
||||
Metadata map[string]interface{}
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
OrderItems []OrderItemResponse
|
||||
Payments []PaymentResponse
|
||||
ID uuid.UUID
|
||||
OrganizationID uuid.UUID
|
||||
OutletID uuid.UUID
|
||||
UserID uuid.UUID
|
||||
CustomerID *uuid.UUID
|
||||
OrderNumber string
|
||||
TableNumber *string
|
||||
OrderType constants.OrderType
|
||||
Status constants.OrderStatus
|
||||
Subtotal float64
|
||||
TaxAmount float64
|
||||
DiscountAmount float64
|
||||
TotalAmount float64
|
||||
TotalCost float64
|
||||
RemainingAmount float64
|
||||
PaymentStatus constants.PaymentStatus
|
||||
RefundAmount float64
|
||||
IsVoid bool
|
||||
IsRefund bool
|
||||
VoidReason *string
|
||||
VoidedAt *time.Time
|
||||
VoidedBy *uuid.UUID
|
||||
RefundReason *string
|
||||
RefundedAt *time.Time
|
||||
RefundedBy *uuid.UUID
|
||||
Notes *string
|
||||
Metadata map[string]interface{}
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
OrderItems []OrderItemResponse
|
||||
Payments []PaymentResponse
|
||||
TotalPaid float64
|
||||
PaymentCount int
|
||||
SplitType *string
|
||||
}
|
||||
|
||||
type OrderItemResponse struct {
|
||||
@@ -230,6 +235,7 @@ type ListOrdersRequest struct {
|
||||
|
||||
type ListOrdersResponse struct {
|
||||
Orders []OrderResponse
|
||||
Payments []PaymentResponse
|
||||
TotalCount int
|
||||
Page int
|
||||
Limit int
|
||||
|
||||
Reference in New Issue
Block a user