1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/models/summary.go
Ferdinand Mütsch cc1a9bbca1 Parallelization.
2019-05-19 21:00:19 +02:00

34 lines
725 B
Go

package models
import (
"time"
)
const (
NSummaryTypes uint8 = 4
SummaryProject uint8 = 0
SummaryLanguage uint8 = 1
SummaryEditor uint8 = 2
SummaryOS uint8 = 3
)
type Summary struct {
UserID string `json:"user_id"`
FromTime *time.Time `json:"from"`
ToTime *time.Time `json:"to"`
Projects []SummaryItem `json:"projects"`
Languages []SummaryItem `json:"languages"`
Editors []SummaryItem `json:"editors"`
OperatingSystems []SummaryItem `json:"operating_systems"`
}
type SummaryItem struct {
Key string `json:"key"`
Total time.Duration `json:"total"`
}
type SummaryItemContainer struct {
Type uint8
Items []SummaryItem
}