mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-19 12:20:24 +08:00
实现总体流量按天统计、按小时统计,提供管理平台Dashboard API
This commit is contained in:
18
internal/db/models/traffic_hourly_stat_model.go
Normal file
18
internal/db/models/traffic_hourly_stat_model.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
// 总的流量统计(按小时)
|
||||
type TrafficHourlyStat struct {
|
||||
Id uint64 `field:"id"` // ID
|
||||
Hour string `field:"hour"` // YYYYMMDDHH
|
||||
Bytes uint64 `field:"bytes"` // 流量字节
|
||||
}
|
||||
|
||||
type TrafficHourlyStatOperator struct {
|
||||
Id interface{} // ID
|
||||
Hour interface{} // YYYYMMDDHH
|
||||
Bytes interface{} // 流量字节
|
||||
}
|
||||
|
||||
func NewTrafficHourlyStatOperator() *TrafficHourlyStatOperator {
|
||||
return &TrafficHourlyStatOperator{}
|
||||
}
|
||||
Reference in New Issue
Block a user