fix: корректная агрегация top peers по диапазонам и починка hourly bucket
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package entity
|
||||
|
||||
type TrafficAggregateDaily struct {
|
||||
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
|
||||
DayStart *int64 `gorm:"column:day_start;default:0;primaryKey" json:"dayStart"`
|
||||
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
|
||||
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
|
||||
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
|
||||
DayStart *int64 `gorm:"column:day_start;default:0;primaryKey" json:"dayStart"`
|
||||
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
|
||||
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
|
||||
}
|
||||
|
||||
func (TrafficAggregateDaily) TableName() string {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package entity
|
||||
|
||||
type TrafficAggregateHourly struct {
|
||||
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
|
||||
HourStart *int64 `gorm:"column:hour_start;default:0;primaryKey" json:"hourStart"`
|
||||
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
|
||||
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
|
||||
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
|
||||
HourStart *int64 `gorm:"column:hour_start;default:0;primaryKey" json:"hourStart"`
|
||||
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
|
||||
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
|
||||
}
|
||||
|
||||
func (TrafficAggregateHourly) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user