优惠券相关逻辑
This commit is contained in:
@@ -154,10 +154,12 @@ type OrderSub struct {
|
||||
PetId int64 `gorm:"index" json:"petId"` //宠物ID
|
||||
PayType int `gorm:"not null" json:"payType"` //支付方式 1线下 2线上 3会员余额
|
||||
Discount int `json:"discount"` //折扣
|
||||
TotalAmount int `gorm:"not null" json:"totalAmount"` //总金额
|
||||
TotalAmount int `gorm:"not null" json:"totalAmount"` //总金额 - 原价
|
||||
ProjectionServiceTime int `json:"projectionServiceTime"` //服务预估时长
|
||||
PayStatus int `gorm:"default:0" json:"payStatus"` //支付状态 0未支付 1已支付
|
||||
PayAmount int `json:"payAmount"` //实际支付金额
|
||||
PayAmount int `json:"payAmount"` //实际支付金额 - 折扣金额
|
||||
GoodsDiscountAmount int `json:"-"` //商品折扣金额
|
||||
GoodsOriginAmount int `json:"-"` //商品原价 除去折扣价的金额
|
||||
PayTime time.Time `gorm:"type:timestamp;" json:"payTime"` //支付时间
|
||||
PayRemark string `json:"payRemark"` //支付备注
|
||||
PetInfo string `json:"petInfo"` //宠物快照信息
|
||||
@@ -168,12 +170,13 @@ type OrderSub struct {
|
||||
|
||||
// OrderDetail 订单明细
|
||||
type OrderDetail struct {
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
Cid int `json:"cid"` //子订单ID
|
||||
Discount int `json:"discount"` //折扣
|
||||
SubOrderId string `gorm:"index;not null" json:"subOrderId"` //子订单ID
|
||||
GoodsId int64 `gorm:"index;not null" json:"goodsId"` //商品ID
|
||||
Amount int `gorm:"not null" json:"amount"` //价格
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
Cid int `json:"cid"` //子订单ID
|
||||
Discount int `json:"discount"` //折扣
|
||||
SubOrderId string `gorm:"index;not null" json:"subOrderId"` //子订单ID
|
||||
GoodsId int64 `gorm:"index;not null" json:"goodsId"` //商品ID
|
||||
Amount int `gorm:"not null" json:"amount"` //价格
|
||||
DiscountAmount int `json:"-"` //折扣价格
|
||||
}
|
||||
|
||||
// OrderServiceRecord 订单服务记录
|
||||
|
||||
Reference in New Issue
Block a user