forked from Ivasoft/mattermost-mobile
* MM_30476 : Added all isolated tables from the server schema * MM_30476 : Updated 'test' script in package.json * MM_30476 : Added USER section of the server schema * MM_30476 : Added the models index back * MM_30476 : Updated User entity as per previous comments * MM_30476 : Added lazy query to channel membership * MM_30476 : Adjusted PR as per suggestions * MM_30476 : Update nick_name in user model Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * MM_30476 : Adjusted extra padding * MM_30476 : Corrected ChannelMemberShipSchema to ChannelMembershipSchema * MM_30476 : Updated types/database/index.ts to types/database/index.d.ts Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {Relation} from '@nozbe/watermelondb';
|
|
import Model, {Associations} from '@nozbe/watermelondb/Model';
|
|
|
|
import User from '@typings/database/user';
|
|
|
|
/**
|
|
* The Preference model hold information about the user's preference in the app.
|
|
* This includes settings about the account, the themes, etc.
|
|
*/
|
|
export default class Preference extends Model {
|
|
/** table (entity name) : Preference */
|
|
static table: string;
|
|
|
|
/** associations : Describes every relationship to this entity. */
|
|
static associations: Associations;
|
|
|
|
/** category : The preference category ( e.g. Themes, Account settings etc..) */
|
|
category: string;
|
|
|
|
/** name : The category name */
|
|
name: string;
|
|
|
|
/** user_id : The foreign key of the user's record in this model */
|
|
userId: string;
|
|
|
|
/** value : The preference's value */
|
|
value: string;
|
|
|
|
/** user : The related record to the parent User model */
|
|
user: Relation<User>;
|
|
}
|