Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct { ID uuid.UUID `json:"id" db:"entity_id" validate:"min=36,max=36"` ProductID uuid.UUID `json:"productId" db:"product_entity_id" validate:"min=36,max=36"` QtyInStore int `json:"qtyInStore" db:"qty_in_store" validate:"min=0"` QtyReserved int `json:"qtyReserved" db:"qty_reserved" validate:"min=0"` QtyAvailable int `json:"qtyAvailable" db:"qty_available" validate:"min=0"` }
Inventory represents an Inventory object
type Order ¶
type Order struct { ID uuid.UUID `json:"id" db:"entity_id" validate:"min=36,max=36"` Code string `json:"code" db:"order_code"` TotalPrice float64 `json:"totalPrice" db:"total_price" validate:"min=0"` Status string `json:"status" db:"status"` Items []OrderItem `json:"items" db:"-"` }
Order represents an Order entity
func (*Order) AttachItems ¶
AttachItems attaches Order Items to an Order
type OrderItem ¶
type OrderItem struct { ID uuid.UUID `json:"id" db:"entity_id" validate:"min=36,max=36"` OrderID uuid.UUID `json:"orderId" db:"order_entity_id" validate:"min=36,max=36"` ProductID uuid.UUID `json:"productId" db:"product_entity_id" validate:"min=36,max=36"` Qty int `json:"qty" db:"qty" validate:"min=1"` Price float64 `json:"price" db:"price"` }
OrderItem represents an Order Item entity
type OrderProcessInput ¶
OrderProcessInput represents an input where the user wants to process an Order
Click to show internal directories.
Click to hide internal directories.