forked from Ivasoft/mattermost-mobile
MM_30476 : Updated all models and typings for the default server (#5069)
This commit is contained in:
13
types/database/app.d.ts
vendored
13
types/database/app.d.ts
vendored
@@ -1,9 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
|
||||
/**
|
||||
* The App model will hold information - such as the version number, build number and creation date -
|
||||
* for the Mattermost mobile app.
|
||||
*/
|
||||
export default class App extends Model {
|
||||
/** table (entity name) : app */
|
||||
static table: string;
|
||||
|
||||
/** build_number : Build number for the app */
|
||||
buildNumber: string;
|
||||
|
||||
/** created_at : Date of creation for this version */
|
||||
createdAt: number;
|
||||
|
||||
/** version_number : Version number for the app */
|
||||
versionNumber: string;
|
||||
}
|
||||
|
||||
13
types/database/global.d.ts
vendored
13
types/database/global.d.ts
vendored
@@ -1,10 +1,19 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
|
||||
/**
|
||||
* The Global model will act as a dictionary of name-value pairs. The value field can be a JSON object or any other
|
||||
* data type. It will hold information that applies to the whole app ( e.g. sidebar settings for tablets)
|
||||
*/
|
||||
export default class Global extends Model {
|
||||
/** table (entity name) : global */
|
||||
static table: string;
|
||||
|
||||
/** name : The label/key to use to retrieve the special 'value' */
|
||||
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[];
|
||||
/** value : The value part of the key-value combination */
|
||||
value: string;
|
||||
}
|
||||
|
||||
11
types/database/server.d.ts
vendored
11
types/database/server.d.ts
vendored
@@ -1,11 +0,0 @@
|
||||
// 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;
|
||||
}
|
||||
28
types/database/servers.d.ts
vendored
Normal file
28
types/database/servers.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Model} from '@nozbe/watermelondb';
|
||||
|
||||
/**
|
||||
* The Server model will help us to identify the various servers a user will log in; in the context of
|
||||
* multi-server support system. The dbPath field will hold the App-Groups file-path
|
||||
*/
|
||||
export default class Servers extends Model {
|
||||
/** table (entity name) : servers */
|
||||
static table: string;
|
||||
|
||||
/** db_path : The file path where the database is stored */
|
||||
dbPath: string;
|
||||
|
||||
/** display_name : The server display name */
|
||||
displayName: string;
|
||||
|
||||
/** mention_count : The number of mention on this server */
|
||||
mentionCount: number;
|
||||
|
||||
/** unread_count : The number of unread messages on this server */
|
||||
unreadCount: number;
|
||||
|
||||
/** url : The online address for the Mattermost server */
|
||||
url: string;
|
||||
}
|
||||
Reference in New Issue
Block a user