Files
mattermost-mobile/types/database/group.d.ts
Avinash Lingaloo 237a6e7932 MM_30476 [v2] Section 'Group' of the server schema (#5072)
* 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 : 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 : Updated all comments to match their variable/field name

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-01-14 00:26:55 +04:00

37 lines
1.4 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import Model, {Associations} from '@nozbe/watermelondb/Model';
import GroupMembership from '@typings/database/group_membership';
import GroupsInChannel from '@typings/database/groups_in_channel';
import GroupsInTeam from '@typings/database/groups_in_team';
/**
* The Group model unifies/assembles users, teams and channels based on a common ground. For example, a group can be
* all users who are in the mobile team. If one needs to send that group a message, then s/he can mention the group's
* name in the message. (e.g @mobile_team)
*/
export default class Group extends Model {
/** table (entity name) : Group */
static table: string;
/** associations : Describes every relationship to this entity. */
static associations: Associations;
/** display_name : The display name for the group */
displayName: string;
/** name : The name of the group */
name: string;
/** groupsInChannel : All the related children records from GroupsInChannel */
groupsInChannel: GroupsInChannel[];
/** groupsInTeam : All the related children records from GroupsInTeam */
groupsInTeam: GroupsInTeam[];
/** groupMemberships : All the related children records from GroupMembership */
groupMemberships: GroupMembership[];
}