basic order view
This commit is contained in:
@@ -37,9 +37,14 @@ type Order struct {
|
||||
Token string `json:"token" binding:"required" gorm:"not null"`
|
||||
Email string `json:"email"`
|
||||
Comment string `json:"comment"`
|
||||
Address AddressInfo `json:"addressinfo"`
|
||||
Shipping Shipping `json:"shipping"`
|
||||
CartItems []CartItem `json:"cartitems"`
|
||||
FirstName string `json:"firstname"`
|
||||
LastName string `json:"lastname"`
|
||||
Address string `json:"address"`
|
||||
PostalCode string `json:"postalcode"`
|
||||
City string `json:"city"`
|
||||
Country string `json:"country"`
|
||||
Shipping string `json:"shipping"`
|
||||
CartItems []CartItem `json:"cartitems" gorm:"foreignKey:OrderID"`
|
||||
}
|
||||
|
||||
type CartItem struct {
|
||||
@@ -50,5 +55,5 @@ type CartItem struct {
|
||||
ItemVariantId uint
|
||||
ItemVariant ItemVariant `json:"itemvariant" gorm:"foreignKey:ItemVariantId"` //gorm one2one
|
||||
Quantity int `json:"quantity" binding:"required"`
|
||||
OrderId uint
|
||||
OrderID uint
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user