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 team section of the server schema * MM_30476 : ADDED section for Group from the server schema * MM_30476 : One PR for one section only * MM_30476 : One PR for one section only * MM_30476 : Rename table schemas to avoid name collision * MM_30476 : ADDED section 'Post' of the server schema * MM_30476 : Updated Post section of the server schema * MM_30476 : Apply suggestions from code review Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> * MM_30476 : Corrected draft wrt to suggestions * MM_30476 : Apply suggestions from code review Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * MM_30476 : ADDED lazy queries to group_membership model * MM_30476 : Update model to match definition - GroupsInChannel * MM_30476 : Removed groups_in_team definition from Post section of this PR * MM_30476 : Updated all comments to match their variable/field name * MM_30476 : Updated test * MM_30476 : Updated imports and groups_in_team definition * MM_30476 : Updated FileInfo * MM_30476 : Updated Posts and PostMetadata ts types Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
28 lines
985 B
TypeScript
28 lines
985 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import Model, {Associations} from '@nozbe/watermelondb/Model';
|
|
|
|
/**
|
|
* The Draft model represents the draft state of messages in Direct/Group messages and in channels
|
|
*/
|
|
export default class Draft extends Model {
|
|
/** table (entity name) : Draft */
|
|
static table: string;
|
|
|
|
/** associations : Describes every relationship to this entity. */
|
|
static associations: Associations;
|
|
|
|
/** channel_id : The foreign key pointing to the channel in which the draft was made */
|
|
channelId: string;
|
|
|
|
/** message : The draft message */
|
|
message: string;
|
|
|
|
/** root_id : The root_id will be empty most of the time unless the draft relates to a draft reply of a thread */
|
|
rootId: string;
|
|
|
|
/** files : The files field will hold an array of files object that have not yet been uploaded and persisted within the FILE entity */
|
|
files: FileInfo[];
|
|
}
|