package entity import "github.com/gogf/gf/v2/os/gtime" // MemberPlans 会员套餐:一个套餐 = 一次「道具直购」+ 对应等级 + 有效天数。 // PriceCents / ProductId 必须与 MP 后台【虚拟支付 → 道具管理】里的道具严格一致, // 否则 wx.requestVirtualPayment 会校验失败。 type MemberPlans struct { Id int64 `json:"id"` PlanKey string `json:"plan_key"` // 套餐标识,如 vip-month Name string `json:"name"` // 展示名,如 月卡 Subtitle string `json:"subtitle"` // 副标题,如 首月特惠 LevelKey string `json:"level_key"` // 购买后生效的等级 DurationDays int `json:"duration_days"` // 有效天数 PriceCents int64 `json:"price_cents"` // 价格(分),全链路不换算 ProductId string `json:"product_id"` // 微信虚拟支付道具 ID Badge string `json:"badge"` // 角标文案,如 最划算 // QuotaPeriodDays 购买该套餐后生效的额度重置周期(天)。 // 0 表示不调整(沿用用户原值或全局设置)——发货时若 >0 会写入 users.quota_period_days。 QuotaPeriodDays int `json:"quota_period_days"` Sort int `json:"sort"` IsEnabled int `json:"is_enabled"` Remark string `json:"remark"` CreatedAt *gtime.Time `json:"created_at"` UpdatedAt *gtime.Time `json:"updated_at"` }