forked from Ivasoft/mattermost-mobile
* MM_33224 : Team [IN PROGRESS] * MM_33224 : Updating test for Team schema after addition of update_at column * MM_33224 : Team Entity - Completed * MM_33224 - TeamChannelHistory - Completed * MM_33224 : Removing duplicates RawValues before processing them * MM-33224 : TeamSearchHistory - Completed * MM-33224 : Slash Command - Completed * MM-33224 : My Team - Completed * MM-33227 [v2] Data Operator Channel section (#5277) * MM_33227 : Channel[IN PROGRESS] * MM_33227 : Channel - Completed * MM-33227 : MyChannelSettings - Completed * MM-33227 : ChannelInfo - Completed * MM-33227 : MyChannel - Completed * MM-33227 : Added expected results in handlers' test * MM_33227 : Renamed RawApp and RawServers fields * MM_33227 : Cleaning up Role * MM_33227 : Cleaning TOS * MM-33227 : Cleaning up Group comparator * MM-33227 : Updated JSDoc * MM-33227 : Fixed 'comparators' to comparator in JSDoc Co-authored-by: Avinash Lingaloo <> Co-authored-by: Avinash Lingaloo <>
73 lines
2.7 KiB
TypeScript
73 lines
2.7 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;
|
|
|
|
/** update_at : The timestamp to when this team was last updated on the server */
|
|
updateAt!: number;
|
|
|
|
/** 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[];
|
|
}
|