| 
									
										
										
										
											2016-03-06 05:15:49 +08:00
										 |  |  | package models | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							| 
									
										
										
										
											2016-03-14 18:12:52 +08:00
										 |  |  | 	"time" | 
					
						
							| 
									
										
										
										
											2016-03-06 05:15:49 +08:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-06 19:47:39 +08:00
										 |  |  | type Preferences struct { | 
					
						
							| 
									
										
										
										
											2016-03-16 05:49:52 +08:00
										 |  |  | 	Id              int64 | 
					
						
							|  |  |  | 	OrgId           int64 | 
					
						
							|  |  |  | 	UserId          int64 | 
					
						
							| 
									
										
										
										
											2018-11-13 03:01:53 +08:00
										 |  |  | 	TeamId          int64 | 
					
						
							| 
									
										
										
										
											2016-03-16 05:49:52 +08:00
										 |  |  | 	Version         int | 
					
						
							|  |  |  | 	HomeDashboardId int64 | 
					
						
							|  |  |  | 	Timezone        string | 
					
						
							| 
									
										
										
										
											2021-10-18 21:27:14 +08:00
										 |  |  | 	WeekStart       string | 
					
						
							| 
									
										
										
										
											2016-03-16 05:49:52 +08:00
										 |  |  | 	Theme           string | 
					
						
							|  |  |  | 	Created         time.Time | 
					
						
							|  |  |  | 	Updated         time.Time | 
					
						
							| 
									
										
										
										
											2016-03-06 05:15:49 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-07 03:42:15 +08:00
										 |  |  | // ---------------------
 | 
					
						
							|  |  |  | // QUERIES
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type GetPreferencesQuery struct { | 
					
						
							| 
									
										
										
										
											2016-03-11 22:30:05 +08:00
										 |  |  | 	Id     int64 | 
					
						
							|  |  |  | 	OrgId  int64 | 
					
						
							| 
									
										
										
										
											2016-03-14 18:12:52 +08:00
										 |  |  | 	UserId int64 | 
					
						
							| 
									
										
										
										
											2018-11-13 03:01:53 +08:00
										 |  |  | 	TeamId int64 | 
					
						
							| 
									
										
										
										
											2016-03-07 03:42:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-07 04:32:22 +08:00
										 |  |  | 	Result *Preferences | 
					
						
							| 
									
										
										
										
											2016-03-07 03:42:15 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-03 04:54:06 +08:00
										 |  |  | type GetPreferencesWithDefaultsQuery struct { | 
					
						
							| 
									
										
										
										
											2018-11-13 03:01:53 +08:00
										 |  |  | 	User *SignedInUser | 
					
						
							| 
									
										
										
										
											2016-04-03 04:54:06 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	Result *Preferences | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-06 05:15:49 +08:00
										 |  |  | // ---------------------
 | 
					
						
							|  |  |  | // COMMANDS
 | 
					
						
							| 
									
										
										
										
											2016-03-06 19:47:39 +08:00
										 |  |  | type SavePreferencesCommand struct { | 
					
						
							| 
									
										
										
										
											2016-03-16 05:49:52 +08:00
										 |  |  | 	UserId int64 | 
					
						
							|  |  |  | 	OrgId  int64 | 
					
						
							| 
									
										
										
										
											2018-11-13 03:01:53 +08:00
										 |  |  | 	TeamId int64 | 
					
						
							| 
									
										
										
										
											2016-03-07 03:42:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-17 14:35:06 +08:00
										 |  |  | 	HomeDashboardId int64  `json:"homeDashboardId"` | 
					
						
							|  |  |  | 	Timezone        string `json:"timezone"` | 
					
						
							| 
									
										
										
										
											2021-10-18 21:27:14 +08:00
										 |  |  | 	WeekStart       string `json:"weekStart"` | 
					
						
							| 
									
										
										
										
											2016-03-17 14:35:06 +08:00
										 |  |  | 	Theme           string `json:"theme"` | 
					
						
							| 
									
										
										
										
											2016-03-07 03:42:15 +08:00
										 |  |  | } |