1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/models/aggregation.go
Ferdinand Mütsch d1be4ce2a3 Fix heartbeats insertion.
Add OS and editor fields.
Introduce aggregations (not working yet).
2019-05-09 00:07:38 +02:00

25 lines
440 B
Go

package models
import "time"
type AggregationType string
const (
AggregationProject AggregationType = "project"
AggregationLanguage AggregationType = "language"
AggregationEditor AggregationType = "editor"
AggregationOS AggregationType = "os"
)
type Aggregation struct {
From time.Time
To time.Time
Type AggregationType
Items []AggregationItem
}
type AggregationItem struct {
Key string
Total time.Duration
}