增加套餐相关代码

This commit is contained in:
GoEdgeLab
2021-10-29 14:02:49 +08:00
parent 3df2751dcd
commit 047b200ce2
9 changed files with 3093 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package serverconfigs
type PlanPriceType = string
const (
PlanPriceTypeBandwidth PlanPriceType = "bandwidth"
PlanPriceTypePeriod PlanPriceType = "period"
)
func FindPlanPriceTypeName(priceType PlanPriceType) string {
switch priceType {
case PlanPriceTypeBandwidth:
return "带宽用量"
case PlanPriceTypePeriod:
return "时间周期"
}
return ""
}
type PlanBandwidthPrice struct {
Base float32 `yaml:"base" json:"base"` // 基础价格,单位是 元/GB
}