mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-05-26 17:05:19 +08:00
增加套餐相关代码
This commit is contained in:
24
pkg/serverconfigs/plan_price_types.go
Normal file
24
pkg/serverconfigs/plan_price_types.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user