| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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"`
- }
|