2020-12-19 01:12:30 +01:00
|
|
|
|
2022-08-14 12:15:09 +02:00
|
|
|
import AbstractModel, { type IAbstract } from './abstractModel'
|
2022-07-21 00:42:36 +02:00
|
|
|
import type { IList } from './list'
|
2020-12-19 01:12:30 +01:00
|
|
|
|
2022-08-14 12:15:09 +02:00
|
|
|
export interface IUserSettings extends IAbstract {
|
2022-06-23 03:22:21 +02:00
|
|
|
name: string
|
|
|
|
emailRemindersEnabled: boolean
|
|
|
|
discoverableByName: boolean
|
|
|
|
discoverableByEmail: boolean
|
|
|
|
overdueTasksRemindersEnabled: boolean
|
2022-07-21 00:42:36 +02:00
|
|
|
defaultListId: undefined | IList['id']
|
2022-06-23 03:22:21 +02:00
|
|
|
weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
|
|
timezone: string
|
2022-07-21 00:42:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default class UserSettingsModel extends AbstractModel implements IUserSettings {
|
2022-08-13 15:38:41 +02:00
|
|
|
name!: string
|
|
|
|
emailRemindersEnabled!: boolean
|
|
|
|
discoverableByName!: boolean
|
|
|
|
discoverableByEmail!: boolean
|
|
|
|
overdueTasksRemindersEnabled!: boolean
|
|
|
|
defaultListId!: undefined | IList['id']
|
|
|
|
weekStart!: 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
|
|
timezone!: string
|
2022-06-23 03:22:21 +02:00
|
|
|
|
2020-12-19 01:12:30 +01:00
|
|
|
defaults() {
|
|
|
|
return {
|
|
|
|
name: '',
|
|
|
|
emailRemindersEnabled: true,
|
2021-04-07 21:31:14 +02:00
|
|
|
discoverableByName: false,
|
|
|
|
discoverableByEmail: false,
|
2021-04-11 16:30:49 +02:00
|
|
|
overdueTasksRemindersEnabled: true,
|
2021-07-17 23:21:46 +02:00
|
|
|
defaultListId: undefined,
|
2021-06-03 18:12:40 +02:00
|
|
|
weekStart: 0,
|
2022-01-14 22:02:45 +01:00
|
|
|
timezone: '',
|
2020-12-19 01:12:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|