1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/models/summary.go

34 lines
725 B
Go
Raw Normal View History

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"`
}
2019-05-19 22:00:19 +03:00
type SummaryItemContainer struct {
Type uint8
Items []SummaryItem
}