完善购买和套餐功能

This commit is contained in:
2026-09-16 17:26:02 +08:00
parent 898dedd75a
commit b48688cbab
19 changed files with 554 additions and 58 deletions
+5
View File
@@ -45,6 +45,10 @@ const (
ProductOrderStatusClosed = "closed" // 已关闭
)
// ProductOrderDurationDays 单品功能默认有效期(天):1 年。
// 到期后租户端权益自动失效(GetTenantModuleCodes 按有效期过滤),需重新购买续费。
const ProductOrderDurationDays = 365
// PlatformProductOrder 产品购买订单 yz_platform_product_order
type PlatformProductOrder struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
@@ -60,6 +64,7 @@ type PlatformProductOrder struct {
Channel string `orm:"column(channel);size(32)" json:"channel"`
Status string `orm:"column(status);size(20);default(pending)" json:"status"`
ActivateTime *time.Time `orm:"column(activate_time);type(datetime);null" json:"activate_time"`
ExpireTime *time.Time `orm:"column(expire_time);type(datetime);null" json:"expire_time"`
Remark string `orm:"column(remark);size(255)" json:"remark"`
CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"`
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`