实现带宽计费套餐

This commit is contained in:
刘祥超
2022-01-23 19:16:52 +08:00
parent 8445e811a5
commit 24c21c5513
26 changed files with 752 additions and 143 deletions

View File

@@ -0,0 +1,34 @@
package models
// ServerBill 服务账单
type ServerBill struct {
Id uint64 `field:"id"` // ID
UserId uint32 `field:"userId"` // 用户ID
ServerId uint32 `field:"serverId"` // 服务ID
Amount float64 `field:"amount"` // 金额
Month string `field:"month"` // 月份
CreatedAt uint64 `field:"createdAt"` // 创建时间
UserPlanId uint32 `field:"userPlanId"` // 用户套餐ID
PlanId uint32 `field:"planId"` // 套餐ID
TotalTrafficBytes uint64 `field:"totalTrafficBytes"` // 总流量
BandwidthPercentileBytes uint64 `field:"bandwidthPercentileBytes"` // 带宽百分位字节
BandwidthPercentile uint8 `field:"bandwidthPercentile"` // 带宽百分位
}
type ServerBillOperator struct {
Id interface{} // ID
UserId interface{} // 用户ID
ServerId interface{} // 服务ID
Amount interface{} // 金额
Month interface{} // 月份
CreatedAt interface{} // 创建时间
UserPlanId interface{} // 用户套餐ID
PlanId interface{} // 套餐ID
TotalTrafficBytes interface{} // 总流量
BandwidthPercentileBytes interface{} // 带宽百分位字节
BandwidthPercentile interface{} // 带宽百分位
}
func NewServerBillOperator() *ServerBillOperator {
return &ServerBillOperator{}
}