mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 18:10:25 +08:00
增加DNS套餐相关数据
This commit is contained in:
30
internal/db/models/nameservers/ns_plan_model.go
Normal file
30
internal/db/models/nameservers/ns_plan_model.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package nameservers
|
||||
|
||||
import "github.com/iwind/TeaGo/dbs"
|
||||
|
||||
// NSPlan NS套餐
|
||||
type NSPlan struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
Name string `field:"name"` // 套餐名称
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
MonthlyPrice float64 `field:"monthlyPrice"` // 月价格
|
||||
YearlyPrice float64 `field:"yearlyPrice"` // 年价格
|
||||
Order uint32 `field:"order"` // 排序
|
||||
Config dbs.JSON `field:"config"` // 配置
|
||||
State uint8 `field:"state"` // 状态
|
||||
}
|
||||
|
||||
type NSPlanOperator struct {
|
||||
Id any // ID
|
||||
Name any // 套餐名称
|
||||
IsOn any // 是否启用
|
||||
MonthlyPrice any // 月价格
|
||||
YearlyPrice any // 年价格
|
||||
Order any // 排序
|
||||
Config any // 配置
|
||||
State any // 状态
|
||||
}
|
||||
|
||||
func NewNSPlanOperator() *NSPlanOperator {
|
||||
return &NSPlanOperator{}
|
||||
}
|
||||
1
internal/db/models/nameservers/ns_plan_model_ext.go
Normal file
1
internal/db/models/nameservers/ns_plan_model_ext.go
Normal file
@@ -0,0 +1 @@
|
||||
package nameservers
|
||||
28
internal/db/models/nameservers/ns_user_plan_model.go
Normal file
28
internal/db/models/nameservers/ns_user_plan_model.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package nameservers
|
||||
|
||||
// NSUserPlan 用户套餐
|
||||
type NSUserPlan struct {
|
||||
Id uint64 `field:"id"` // ID
|
||||
UserId uint64 `field:"userId"` // 用户ID
|
||||
PlanId uint32 `field:"planId"` // 套餐ID
|
||||
DayFrom string `field:"dayFrom"` // YYYYMMDD
|
||||
DayTo string `field:"dayTo"` // YYYYMMDD
|
||||
PeriodUnit string `field:"periodUnit"` // monthly|yearly
|
||||
CreatedAt uint64 `field:"createdAt"` // 创建时间
|
||||
State uint8 `field:"state"` // 状态
|
||||
}
|
||||
|
||||
type NSUserPlanOperator struct {
|
||||
Id any // ID
|
||||
UserId any // 用户ID
|
||||
PlanId any // 套餐ID
|
||||
DayFrom any // YYYYMMDD
|
||||
DayTo any // YYYYMMDD
|
||||
PeriodUnit any // monthly|yearly
|
||||
CreatedAt any // 创建时间
|
||||
State any // 状态
|
||||
}
|
||||
|
||||
func NewNSUserPlanOperator() *NSUserPlanOperator {
|
||||
return &NSUserPlanOperator{}
|
||||
}
|
||||
1
internal/db/models/nameservers/ns_user_plan_model_ext.go
Normal file
1
internal/db/models/nameservers/ns_user_plan_model_ext.go
Normal file
@@ -0,0 +1 @@
|
||||
package nameservers
|
||||
@@ -51,6 +51,7 @@ func (this *SysSettingService) ReadSysSetting(ctx context.Context, req *pb.ReadS
|
||||
systemconfigs.SettingCodeUserUIConfig,
|
||||
systemconfigs.SettingCodeNSUserConfig,
|
||||
systemconfigs.SettingCodeUserOrderConfig,
|
||||
systemconfigs.SettingCodeServerGlobalConfig,
|
||||
}, req.Code) {
|
||||
return nil, errors.New("can not read setting code '" + req.Code + "'")
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user