Files
mattermost-mobile/types/database/team.d.ts
Avinash Lingaloo 619503eedb MM_30476 [v2] Section 'Channel' of the server schema (#5078)
* MM_30476 : Added all isolated tables from the server schema

* MM_30476 : Updated 'test' script in package.json

* MM_30476 : Rename table schemas to avoid name collision

* MM_30476 : Added 'Channel' section of the server schema

* MM_30476 : Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* MM_30476 : Converted @relation to @immutableRelation

* MM_30476 : Apply suggestions from code review

* MM_30476 : Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* MM_30476 : Minor updates to the comments

* MM_30476 : Minor update to the comments

* MM_30476 : Updated table schema exports

* MM_30476 : Updated comments

* MM_30476 : Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* MM_30476 : Update as per suggestions

* MM_30476 : Updated comments

* MM_30476 : Team and MyTeam share 1:1 relationship

* MM_30476 : Updated team comments

* MM_30476 : Updated myteam and team comments

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-01-15 18:41:59 +04:00

70 lines
2.6 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Query} from '@nozbe/watermelondb';
import Model, {Associations} from '@nozbe/watermelondb/Model';
import Channel from '@typings/database/channel';
import GroupsInTeam from '@typings/database/groups_in_team';
import MyTeam from '@typings/database/my_team';
import SlashCommand from '@typings/database/slash_command';
import TeamChannelHistory from '@typings/database/team_channel_history';
import TeamMembership from '@typings/database/team_membership';
import TeamSearchHistory from '@typings/database/team_search_history';
/**
* A Team houses and enables communication to happen across channels and users.
*/
export default class Team extends Model {
/** table (entity name) : Team */
static table: string;
/** associations : Describes every relationship to this entity. */
static associations: Associations;
/** is_allow_open_invite : Boolean flag indicating if this team is open to the public */
isAllowOpenInvite: boolean;
/** description : The description for the team */
description: string;
/** display_name : The display name for the team */
displayName: string;
/** is_group_constrained : Boolean flag indicating if members are managed groups */
isGroupConstrained: boolean;
/** last_team_icon_updated_at : Timestamp for when this team's icon has been updated last */
lastTeamIconUpdatedAt: number;
/** name : The name for the team */
name: string;
/** type : The type of team ( e.g. open/private ) */
type: string;
/** allowed_domains : List of domains that can join this team */
allowedDomains: string;
/** channels : All the channels associated with this team */
channels: Channel[];
/** groupsInTeam : All the groups associated with this team */
groupsInTeam: GroupsInTeam[];
/** myTeam : Retrieves additional information about the team that this user is possibly part of. This query might yield no result if the user isn't part of a team. */
myTeam: Query<MyTeam>;
/** slashCommands : All the slash commands associated with this team */
slashCommands: SlashCommand[];
/** teamChannelHistory : A history of the channels in this team that has been visited, ordered by the most recent and capped to the last 5 */
teamChannelHistory: Query<TeamChannelHistory>;
/** members : All the users associated with this team */
members: TeamMembership[];
/** teamSearchHistories : All the searches performed on this team */
teamSearchHistories: TeamSearchHistory[];
}