package org

type Organization struct {
	ID           string `json:"id,omitempty"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	ClusterCount int    `json:"clusterCount"`
	LastUpdated  int64  `json:"lastUpdated"`
	// TODO: it should be in new api but UI hope to put in this response
	RoleNames        []string `json:"roleNames"`
	OrganizationType string   `json:"type"`
	IsStarred        bool     `json:"isStarred"`
	Owner            string   `json:"owner"`
	ExternalID       string   `json:"externalID"`
	EmailDomain      string   `json:"emailDomain"`
}

type UpdateOrganizationReq struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type ListOrganizationsResp struct {
	Total int64          `json:"total"`
	Items []Organization `json:"items"`
}

type ListUsersResp struct {
	Total int    `json:"total"`
	Items []User `json:"items"`
}

type InvitesReq struct {
	Invites []Invite `json:"invites"`
}

type Invite struct {
	UserName string `json:"userName"`

	RoleID uint `json:"role"`
}

type User struct {
	UserID   uint64 `json:"userID"`
	UserName string `json:"userName"`
	RoleName string `json:"roleName"`
}

//type ApiKeyRequest struct {
//	Name string `json:"name"`
//}

type ApiKeyResponse struct {
	ID uint `json:"id"`
	// Name string `json:"name"`
	Key string `json:"key"`

	CreatedTime int64 `json:"createdTime"`
}

type ListApiKeyResponse struct {
	Total int64            `json:"total"`
	Items []ApiKeyResponse `json:"items"`
}

type ClusterDataRequest struct {
	StartTime int64 `json:"startTime"`
	EndTime   int64 `json:"endTime"`
}

type TaskStatus struct {
	TaskType string `json:"taskType"`
	TaskName string `json:"name"`
	Process  int    `json:"process"`
	Size     int64  `json:"size"`
}

type Role struct {
	ID   uint   `json:"id"`
	Name string `json:"name"`
}

type ListProjectsResp struct {
	Total int64     `json:"total"`
	Items []Project `json:"items"`
}

type Project struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}
