grafana/pkg/models/preferences.go

49 lines
795 B
Go
Raw Normal View History

2016-03-05 15:15:49 -06:00
package models
import (
"time"
2016-03-05 15:15:49 -06:00
)
2016-03-06 05:47:39 -06:00
type Preferences struct {
Id int64
OrgId int64
UserId int64
2018-11-12 13:01:53 -06:00
TeamId int64
Version int
HomeDashboardId int64
Timezone string
Theme string
Created time.Time
Updated time.Time
2016-03-05 15:15:49 -06:00
}
2016-03-06 13:42:15 -06:00
// ---------------------
// QUERIES
type GetPreferencesQuery struct {
2016-03-11 08:30:05 -06:00
Id int64
OrgId int64
UserId int64
2018-11-12 13:01:53 -06:00
TeamId int64
2016-03-06 13:42:15 -06:00
Result *Preferences
2016-03-06 13:42:15 -06:00
}
type GetPreferencesWithDefaultsQuery struct {
2018-11-12 13:01:53 -06:00
User *SignedInUser
Result *Preferences
}
2016-03-05 15:15:49 -06:00
// ---------------------
// COMMANDS
2016-03-06 05:47:39 -06:00
type SavePreferencesCommand struct {
UserId int64
OrgId int64
2018-11-12 13:01:53 -06:00
TeamId int64
2016-03-06 13:42:15 -06:00
2016-03-17 01:35:06 -05:00
HomeDashboardId int64 `json:"homeDashboardId"`
Timezone string `json:"timezone"`
Theme string `json:"theme"`
2016-03-06 13:42:15 -06:00
}