// Package team provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
package team

import (
	"github.com/meshery/schemas/models/core"
)

// Team A Team is a group of one or more users. Teams are often used as a grouping mechanism for assigning permissions, whether in the context of an organization, a workspace, or some other domain within Meshery. Learn more at https://docs.meshery.io/concepts/logical/teams
type Team struct {
	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID core.Uuid `db:"id" json:"id" yaml:"id"`

	// Name Team name
	Name string `db:"name" json:"name" yaml:"name"`

	// Description Team description
	Description *string `db:"description" json:"description,omitempty" yaml:"description"`

	// Owner A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	Owner *core.Uuid `db:"owner" json:"owner,omitempty" yaml:"owner"`

	// Metadata Additional metadata for the team
	Metadata  core.Map          `db:"metadata" json:"metadata,omitempty" yaml:"metadata"`
	CreatedAt core.Time `db:"created_at" json:"created_at,omitempty" yaml:"created_at"`
	UpdatedAt core.Time `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at"`

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt core.NullTime `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at"`
}

// TeamMember defines model for TeamMember.
type TeamMember map[string]interface{}

// TeamMembersPage defines model for TeamMembersPage.
type TeamMembersPage struct {
	// Data The data of the teammemberspage.
	Data *[]TeamMember `json:"data,omitempty" yaml:"data,omitempty"`

	// Page Current page number of the result set.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Number of items per page.
	PageSize *int `json:"page_size,omitempty" yaml:"page_size,omitempty"`

	// TotalCount Total number of items available.
	TotalCount *int `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

// TeamPage Paginated list of teams
type TeamPage struct {
	Page     core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`

	// Teams The teams of the teampage.
	Teams      []Team              `json:"teams,omitempty" yaml:"teams,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

// TeamPayload Payload for creating a new team
type TeamPayload struct {
	Description core.Text `json:"description,omitempty" yaml:"description,omitempty"`
	Name        core.Text `json:"name" yaml:"name"`
}

// TeamUpdatePayload Payload for updating an existing team
type TeamUpdatePayload struct {
	Description core.Text `json:"description,omitempty" yaml:"description,omitempty"`
	Name        core.Text `json:"name,omitempty" yaml:"name,omitempty"`
}

// TeamsUsersMapping Mapping between teams and users
type TeamsUsersMapping struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt core.NullTime  `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`
	TeamId    core.TeamId    `db:"team_id" json:"team_id" yaml:"team_id"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt core.UpdatedAt `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

	// UserId user's email or username
	UserId core.UserId `db:"owner" json:"user_id,omitempty" yaml:"user_id,omitempty"`
}

// TeamsUsersMappingPage Paginated list of team-user mappings
type TeamsUsersMappingPage struct {
	Page     core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`

	// TeamsUsersMapping The teams users mapping of the teamsusersmappingpage.
	TeamsUsersMapping []TeamsUsersMapping `json:"teamsUsersMapping,omitempty" yaml:"teamsUsersMapping,omitempty"`
	TotalCount        core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

// Order defines model for order.
type Order = string

// OrgId defines model for orgId.
type OrgId = core.OrganizationId

// Page defines model for page.
type Page = string

// Pagesize defines model for pagesize.
type Pagesize = string

// Search defines model for search.
type Search = string

// TeamId defines model for teamId.
type TeamId = core.TeamId
