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-14 12:15:45 +02:00
|
|
|
name = ''
|
|
|
|
emailRemindersEnabled = true
|
|
|
|
discoverableByName = false
|
|
|
|
discoverableByEmail = false
|
|
|
|
overdueTasksRemindersEnabled = true
|
|
|
|
defaultListId: undefined | IList['id'] = undefined
|
|
|
|
weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6 = 0
|
|
|
|
timezone = ''
|
2022-06-23 03:22:21 +02:00
|
|
|
|
2022-08-14 12:15:45 +02:00
|
|
|
constructor(data: Partial<IUserSettings>) {
|
|
|
|
super()
|
|
|
|
this.assignData(data)
|
2020-12-19 01:12:30 +01:00
|
|
|
}
|
|
|
|
}
|