30 lines
1.3 KiB
Go
30 lines
1.3 KiB
Go
package entity
|
||
|
||
import "github.com/gogf/gf/v2/os/gtime"
|
||
|
||
// Coupons 优惠券模板。
|
||
//
|
||
// 券型(CouponType):1 免单券(走支付)/ 2 展示券(仅展示,**新建默认**)。
|
||
// 面额语义(Kind):1 满减 / 2 免单;Value 为面额(分,仅展示用途)。
|
||
// 适用范围(Scope):0 全部 / 1 指定会员套餐 / 2 指定次数包,ScopeKeys 为 JSON 数组。
|
||
// TotalLimit 总发行上限(0=不限),PerUserLimit 单人限领。
|
||
type Coupons struct {
|
||
Id int64 `json:"id"`
|
||
Title string `json:"title"`
|
||
SubTitle string `json:"sub_title"`
|
||
CouponType int `json:"coupon_type"`
|
||
Kind int `json:"kind"`
|
||
Value int `json:"value"`
|
||
ThresholdCents int `json:"threshold_cents"`
|
||
Scope int `json:"scope"`
|
||
ScopeKeys string `json:"scope_keys"`
|
||
TotalLimit int `json:"total_limit"`
|
||
PerUserLimit int `json:"per_user_limit"`
|
||
ValidFrom *gtime.Time `json:"valid_from"`
|
||
ValidTo *gtime.Time `json:"valid_to"`
|
||
Status int `json:"status"`
|
||
Remark string `json:"remark"`
|
||
CreatedAt *gtime.Time `json:"created_at"`
|
||
UpdatedAt *gtime.Time `json:"updated_at"`
|
||
}
|