aa
This commit is contained in:
@@ -35,6 +35,16 @@ const (
|
||||
OrderTypeDefendPrice = 3 //守价订单
|
||||
)
|
||||
|
||||
const (
|
||||
CouponStatusRe = -2 //优惠券状态还没生效
|
||||
CouponStatusOverdue = -1 //已过期
|
||||
CouponStatusNormal = 0 //正常
|
||||
)
|
||||
|
||||
const (
|
||||
UserCouponStatusOverdue = 1 // 已被使用
|
||||
)
|
||||
|
||||
var (
|
||||
PayStatusName = map[int]string{
|
||||
PayStatusNo: "待支付",
|
||||
@@ -49,6 +59,13 @@ var (
|
||||
RefundStatusYes: "已退款",
|
||||
RefundStatusFailed: "退款失败",
|
||||
}
|
||||
|
||||
CouponStatusName = map[int]string{
|
||||
CouponStatusRe: "还没生效",
|
||||
CouponStatusOverdue: "已过期",
|
||||
CouponStatusNormal: "正常",
|
||||
UserCouponStatusOverdue: "已被使用",
|
||||
}
|
||||
)
|
||||
|
||||
type ModelTimeInfo struct {
|
||||
@@ -410,16 +427,17 @@ func (v *PriceDefendOrder) TableIndex() [][]string {
|
||||
}
|
||||
|
||||
type Coupons struct {
|
||||
ModelIDCULD
|
||||
ModelIDCUL
|
||||
|
||||
CouponType int `json:"couponType"` //优惠券类型 ,1为总额满减, 2为运费优惠,
|
||||
Name string `json:"name"` //优惠券名字
|
||||
Desc string `json:"desc"` //优惠券详情描述
|
||||
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
|
||||
CouponType int `json:"couponType"` //优惠券类型 ,1为总额满减, 2为运费优惠,
|
||||
Name string `json:"name"` //优惠券名字
|
||||
Desc string `json:"desc"` //优惠券详情描述
|
||||
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
|
||||
CouponStatus int `json:"couponStatus"` //优惠券状态,0为正常可使用,-1为已过期, -2为还没开始
|
||||
}
|
||||
|
||||
func (v *Coupons) TableIndex() [][]string {
|
||||
@@ -431,14 +449,15 @@ func (v *Coupons) TableIndex() [][]string {
|
||||
type UserCoupons struct {
|
||||
ModelIDCUL
|
||||
|
||||
CouponID int `orm:"column(coupon_id)" json:"couponID"` //优惠券ID
|
||||
UserID string `orm:"column(user_id)" json:"userID"` //userID
|
||||
CouponStatus int `json:"couponStatus"` //优惠券状态,0为正常可使用,-1为已过期, -2为已使用
|
||||
CouponID int `orm:"column(coupon_id)" json:"couponID"` //优惠券ID
|
||||
UserID string `orm:"column(user_id)" json:"userID"` //userID
|
||||
Mobile string `json:"moblie"` //电话,可能他还没注册
|
||||
UserCouponStatus int `json:"userCouponStatus"` //优惠券状态,0为正常可使用,-1为已过期, 1为已使用
|
||||
}
|
||||
|
||||
func (v *UserCoupons) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"CouponID", "UserID"},
|
||||
[]string{"CouponID", "UserID", "Mobile"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user