You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.1 KiB
71 lines
3.1 KiB
package model
|
|
|
|
import (
|
|
"bkb-seller/global"
|
|
"time"
|
|
)
|
|
|
|
type Order struct {
|
|
global.MG_MODEL
|
|
OrderID string `gorm:"size:50;index" json:"orderID"` //订单号
|
|
StoreNo string `gorm:"size:60" json:"store_no"` // 店铺编号
|
|
CaptureID string `gorm:"size:50" json:"captureID"` //paypal收款确认id
|
|
Code string `gorm:"size:20" json:"code"` //网红码?
|
|
UserID string `gorm:"size:50;index" json:"userID"` //用户id
|
|
CommodID uint `gorm:"size:50;index" json:"commodID"` //商品id
|
|
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` //商品规格编号
|
|
Type int `gorm:"type:int(1);default:1" json:"type"` //类型 1-普通订单 2-预售订单
|
|
Price float64 `gorm:"type:decimal(10,2)" json:"price"` //商品价格
|
|
Number int `gorm:"type:int(10)" json:"number"` //数量
|
|
PaidPrice float64 `gorm:"type:decimal(10,2)" json:"paidPrice"` //实付价格
|
|
Status int `gorm:"type:int(1)" json:"status"` //订单状态 1-待付款 2-待发货 3-已发货 4-已完成 5-已取消
|
|
PayTime *time.Time `gorm:"" json:"payTime"` //付款时间
|
|
SendTime *time.Time `gorm:"" json:"sendTime"` //发货时间
|
|
ConfirmTime *time.Time `gorm:"" json:"confirmTime"` //收货时间
|
|
PaypalID string `gorm:"size:50" json:"paypalID"` // paypal订单号
|
|
}
|
|
|
|
type OrderList struct {
|
|
Order
|
|
Goods OrderGoodsDetail `gorm:"-" json:"goods"` // 商品信息
|
|
Address OrderAddress `gorm:"-" json:"address"` //地址
|
|
Deliver OrderDeliver `gorm:"-" json:"deliver"` //发货信息
|
|
InfluencerUser InfluencerUserClaimView `gorm:"-" json:"influencer"` //网红信息
|
|
CustomerPhone string `gorm:"-" json:"customerPhone"` //买家手机
|
|
InfluencerAmount string `gorm:"-" json:"IAmount"` //网红佣金
|
|
SellerAmount string `gorm:"-" json:"SAmount"` //入账
|
|
}
|
|
|
|
type OrderDetail struct {
|
|
Order
|
|
Goods OrderGoodsDetail `gorm:"-" json:"goods"` // 商品信息
|
|
Address OrderAddress `gorm:"-" json:"address"` //地址
|
|
Deliver OrderDeliver `gorm:"-" json:"deliver"` //发货信息
|
|
Customer UserSimple `gorm:"-" json:"customer"` // 卖家信息
|
|
Chain Chain `gorm:"-" json:"chain"` // 区块链
|
|
InfluencerAmount string `gorm:"-" json:"IAmount"` //网红佣金
|
|
SellerAmount string `gorm:"-" json:"SAmount"` //入账
|
|
}
|
|
|
|
type OrderSummary struct {
|
|
Code string `json:"code"`
|
|
Count int `json:"count"`
|
|
Bonus float64 `json:"bonus"` //网红佣金
|
|
Sales float64 `json:"sales"` //入账
|
|
}
|
|
|
|
type Chain struct {
|
|
Address string `json:"address"` // 合约地址
|
|
}
|
|
|
|
func (Order) TableName() string {
|
|
return "order"
|
|
}
|
|
|
|
func (OrderList) TableName() string {
|
|
return "order"
|
|
}
|
|
|
|
func (OrderDetail) TableName() string {
|
|
return "order"
|
|
}
|
|
|