add order
This commit is contained in:
@@ -25,19 +25,21 @@ type AddressInfo struct {
|
||||
}
|
||||
|
||||
type Shipping struct {
|
||||
Id string `json:"name"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Price float64 `json:"price"`
|
||||
}
|
||||
|
||||
type Order struct {
|
||||
gorm.Model
|
||||
SessionId string `json:"sessionid" binding:"required" gorm:"not null"`
|
||||
Status OrderStatus `json:"status"`
|
||||
Token string `json:"token" binding:"required" gorm:"not null"`
|
||||
CartItems []CartItem `json:"cartitems"`
|
||||
Email string `json:"email"`
|
||||
Comment string `json:"comment"`
|
||||
Shipping
|
||||
Address AddressInfo `json:"addressinfo"`
|
||||
Shipping Shipping `json:"shipping"`
|
||||
CartItems []CartItem `json:"cartitems"`
|
||||
}
|
||||
|
||||
type CartItem struct {
|
||||
|
||||
Reference in New Issue
Block a user