forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preferences.go
53 lines (43 loc) · 863 Bytes
/
preferences.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package models
import (
"errors"
"time"
)
// Typed errors
var (
ErrPreferencesNotFound = errors.New("Preferences not found")
)
type Preferences struct {
Id int64
OrgId int64
UserId int64
Version int
HomeDashboardId int64
Timezone string
Theme string
Created time.Time
Updated time.Time
}
// ---------------------
// QUERIES
type GetPreferencesQuery struct {
Id int64
OrgId int64
UserId int64
Result *Preferences
}
type GetPreferencesWithDefaultsQuery struct {
Id int64
OrgId int64
UserId int64
Result *Preferences
}
// ---------------------
// COMMANDS
type SavePreferencesCommand struct {
UserId int64
OrgId int64
HomeDashboardId int64 `json:"homeDashboardId"`
Timezone string `json:"timezone"`
Theme string `json:"theme"`
}