expand orders
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type CustomerOrder struct {
|
||||
OrderID uint `gorm:"column:order_id;primaryKey;autoIncrement" json:"order_id"`
|
||||
UserID uint `gorm:"column:user_id;not null;index" json:"user_id"`
|
||||
@@ -8,6 +10,11 @@ type CustomerOrder struct {
|
||||
AddressString string `gorm:"column:address_string;not null" json:"address_string"`
|
||||
AddressUnparsed *AddressUnparsed `gorm:"-" json:"address_unparsed"`
|
||||
Status string `gorm:"column:status;size:50;not null" json:"status"`
|
||||
BasePrice float64 `gorm:"column:base_price;type:decimal(10,2);not null" json:"base_price"`
|
||||
TaxIncl float64 `gorm:"column:tax_incl;type:decimal(10,2);not null" json:"tax_incl"`
|
||||
TaxExcl float64 `gorm:"column:tax_excl;type:decimal(10,2);not null" json:"tax_excl"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;not null" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;not null" json:"updated_at"`
|
||||
Products []OrderProduct `gorm:"foreignKey:OrderID;references:OrderID" json:"products"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user