You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.3 KiB

package goods
import "src/module/common"
func (Coupon) TableName() string {
return "coupon"
}
// Coupon 结构体表示优惠券信息
type Coupon struct {
ID int `json:"id"` // 优惠券ID
Name string `json:"name"` // 优惠券名称
Type string `json:"type"` // 优惠券类型
GoodsID string `json:"goods_ids"` // 商品ID
Amount string `json:"amount"` // 优惠券金额
Enough string `json:"enough"` // 满足条件金额
Stock int `json:"stock"` // 库存数量
Limit int `json:"limit"` // 领取限制
GetTime common.TimeRange `json:"gettime"` // 领取时间范围
UseTime common.TimeRange `json:"usetime"` // 使用时间范围
Description string `json:"description"` // 优惠券描述
StartTime int64 `json:"gettimestart"` // 领取开始时间
EndTime int64 `json:"gettimeend"` // 领取结束时间
Status string `json:"status_code"` // 优惠券状态代码
StatusName string `json:"status_name"` // 优惠券状态名称
UserCoupons []string `json:"user_coupons"` // 用户优惠券列表
}