This commit is contained in:
苏尹岚
2021-01-08 11:45:30 +08:00
parent 16bb40b4a7
commit 607e2f4396

View File

@@ -409,6 +409,37 @@ func (v *PriceDefendOrder) TableIndex() [][]string {
}
}
type Coupons struct {
ModelIDCULD
CouponType int `json:"couponType"` //优惠券类型 1为总额满减 2为运费优惠
BeginAt time.Time `json:"beginAt"` //开始时间
EndAt time.Time `json:"endAt"` //到期时间
UpperLimit int `json:"upperLimit"` //满多少
Cut int `json:"cut"` //减多少
StoreLimit string `orm:"type(text)" json:"storeLimit"` //门店限制如100118,102919
}
func (v *Coupons) TableIndex() [][]string {
return [][]string{
[]string{"BeginAt"},
}
}
type UserCoupons struct {
ModelIDCUL
CouponID int `json:"couponID"` //优惠券ID
UserID string `json:"userID"` //userID
CouponStatus int `json:"couponStatus"` //优惠券状态0为正常可使用-1为已过期 -2为已使用
}
func (v *UserCoupons) TableIndex() [][]string {
return [][]string{
[]string{"CouponID", "UserID"},
}
}
// 判断是否是购买平台自有物流
// 对于京东,饿百来说,就是其自有的物流,对于微商城来说,是达达
func IsWaybillPlatformOwn(bill *Waybill) bool {