From 607e2f4396ac5d76a3d2fec4de6f06406b468b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 8 Jan 2021 11:45:30 +0800 Subject: [PATCH] aa --- business/model/order.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/business/model/order.go b/business/model/order.go index 99cc1a475..e496bec72 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -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 {