feat(preferences): lots of refactoring and changes to #3214

This commit is contained in:
Torkel Ödegaard
2016-03-15 22:49:52 +01:00
parent e06756bcab
commit a88176e060
7 changed files with 66 additions and 102 deletions
+14 -20
View File
@@ -11,13 +11,15 @@ var (
)
type Preferences struct {
Id int64
OrgId int64
UserId int64
Version int
Preference map[string]interface{}
Created time.Time
Updated time.Time
Id int64
OrgId int64
UserId int64
Version int
HomeDashboardId int64
Timezone string
Theme string
Created time.Time
Updated time.Time
}
// ---------------------
@@ -33,19 +35,11 @@ type GetPreferencesQuery struct {
// ---------------------
// COMMANDS
type SavePreferencesCommand struct {
Preference map[string]interface{} `json:"Preference" binding:"Required"`
UserId int64 `json:"-"`
OrgId int64 `json:"-"`
}
UserId int64
OrgId int64
// ----------------------
// DTO & Projections
type PreferencesDTO struct {
Id int64 `json:"Id"`
UserId int64 `json:"UserId"`
OrgId int64 `json:"OrgId"`
Preference map[string]interface{} `json:"Preference"`
HomeDashboardId int64
Timezone string
Theme string
}