Files
qitongxue-api/internal/model/entity/entity_coupons.go
2026-09-29 10:57:01 +08:00

30 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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"`
}