forked from Ivasoft/mattermost-mobile
MM-30475 [v2] watermelondb default schema (#4977)
* MM_30475 : ADDED default schema * MM_30475 : Updated typings and references to MM_TABLES * MM_30475 : Removed the app_id (The id field will be overwritten at the time of creation.) * MM_30475 : Updated PR as per comments
This commit is contained in:
9
types/database/app.d.ts
vendored
Normal file
9
types/database/app.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
export default class App extends Model {
|
||||
static table: string;
|
||||
buildNumber: string;
|
||||
createdAt: number;
|
||||
versionNumber: string;
|
||||
}
|
||||
10
types/database/global.d.ts
vendored
Normal file
10
types/database/global.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
export default class Global extends Model {
|
||||
static table: string;
|
||||
name: string;
|
||||
|
||||
// TODO : atm, the return type for 'value' is string[]. However, this return type can change to string/number/etc. A broader definition will need to be applied and this return type updated accordingly.
|
||||
value: string[];
|
||||
}
|
||||
11
types/database/server.d.ts
vendored
Normal file
11
types/database/server.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
export default class Server extends Model {
|
||||
static table: string;
|
||||
dbPath: string;
|
||||
displayName: string;
|
||||
mentionCount: number;
|
||||
unreadCount: number;
|
||||
url: string;
|
||||
}
|
||||
Reference in New Issue
Block a user