套餐可以设置带宽限制

This commit is contained in:
GoEdgeLab
2024-01-11 15:22:37 +08:00
parent 75b26b08a5
commit f6a78ae680
13 changed files with 667 additions and 281 deletions

View File

@@ -20,20 +20,13 @@ const DefaultPlanExpireNoticePageBody = `<!DOCTYPE html>
// UserPlanConfig 用户套餐配置
type UserPlanConfig struct {
Id int64 `yaml:"id" json:"id"` // 用户套餐ID
DayTo string `yaml:"dayTo" json:"dayTo"` // 有效期
Plan *PlanConfig `yaml:"plan" json:"plan"`
Id int64 `yaml:"id" json:"id"` // 用户套餐ID
DayTo string `yaml:"dayTo" json:"dayTo"` // 有效期
PlanId int64 `yaml:"planId" json:"planId"` // 套餐定义ID
}
// Init 初始化
func (this *UserPlanConfig) Init() error {
if this.Plan != nil {
err := this.Plan.Init()
if err != nil {
return err
}
}
return nil
}