22 lines
622 B
Go
22 lines
622 B
Go
|
|
package consts
|
||
|
|
|
||
|
|
// BillingMethod 计费方式枚举
|
||
|
|
type BillingMethod string
|
||
|
|
|
||
|
|
const (
|
||
|
|
BillingMethodCount BillingMethod = "count" // 按数量
|
||
|
|
BillingMethodDuration BillingMethod = "duration" // 按时长
|
||
|
|
BillingMethodSku BillingMethod = "sku" // 按SKU
|
||
|
|
BillingMethodDurationAndSku BillingMethod = "duration_and_sku" // 按时长+SKU
|
||
|
|
)
|
||
|
|
|
||
|
|
// GetAllBillingMethods 获取所有计费方式
|
||
|
|
func GetAllBillingMethods() []BillingMethod {
|
||
|
|
return []BillingMethod{
|
||
|
|
BillingMethodCount,
|
||
|
|
BillingMethodDuration,
|
||
|
|
BillingMethodSku,
|
||
|
|
BillingMethodDurationAndSku,
|
||
|
|
}
|
||
|
|
}
|