1// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2// See LICENSE.txt for license information.
3
4package model
5
6type TeamSearch struct {
7	Term                     string  `json:"term"`
8	Page                     *int    `json:"page,omitempty"`
9	PerPage                  *int    `json:"per_page,omitempty"`
10	AllowOpenInvite          *bool   `json:"allow_open_invite,omitempty"`
11	GroupConstrained         *bool   `json:"group_constrained,omitempty"`
12	IncludeGroupConstrained  *bool   `json:"include_group_constrained,omitempty"`
13	PolicyID                 *string `json:"policy_id,omitempty"`
14	ExcludePolicyConstrained *bool   `json:"exclude_policy_constrained,omitempty"`
15	IncludePolicyID          *bool   `json:"-"`
16	IncludeDeleted           *bool   `json:"-"`
17	TeamType                 *string `json:"-"`
18}
19
20func (t *TeamSearch) IsPaginated() bool {
21	return t.Page != nil && t.PerPage != nil
22}
23