} from 'sequelize-typescript'
import { TokensCache } from '@server/lib/auth/tokens-cache'
import { MNotificationSettingFormattable } from '@server/types/models'
+import { AttributesOnly } from '@shared/typescript-utils'
import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
import { throwIfNotValid } from '../utils'
}
]
})
-export class UserNotificationSettingModel extends Model {
+export class UserNotificationSettingModel extends Model<Partial<AttributesOnly<UserNotificationSettingModel>>> {
@AllowNull(false)
@Default(null)
@Column
newPluginVersion: UserNotificationSettingValue
+ @AllowNull(false)
+ @Default(null)
+ @Is(
+ 'UserNotificationSettingMyVideoStudioEditionFinished',
+ value => throwIfNotValid(value, isUserNotificationSettingValid, 'myVideoStudioEditionFinished')
+ )
+ @Column
+ myVideoStudioEditionFinished: UserNotificationSettingValue
+
@ForeignKey(() => UserModel)
@Column
userId: number
abuseNewMessage: this.abuseNewMessage,
abuseStateChange: this.abuseStateChange,
newPeerTubeVersion: this.newPeerTubeVersion,
+ myVideoStudioEditionFinished: this.myVideoStudioEditionFinished,
newPluginVersion: this.newPluginVersion
}
}