mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
47 lines
859 B
Go
47 lines
859 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
// Team is information global to a team
|
||
|
// swagger:model
|
||
|
type Team struct {
|
||
|
// ID of the team
|
||
|
// required: true
|
||
|
ID string `json:"id"`
|
||
|
|
||
|
// Title of the team
|
||
|
// required: false
|
||
|
Title string `json:"title"`
|
||
|
|
||
|
// Token required to register new users
|
||
|
// required: true
|
||
|
SignupToken string `json:"signupToken"`
|
||
|
|
||
|
// Team settings
|
||
|
// required: false
|
||
|
Settings map[string]interface{} `json:"settings"`
|
||
|
|
||
|
// ID of user who last modified this
|
||
|
// required: true
|
||
|
ModifiedBy string `json:"modifiedBy"`
|
||
|
|
||
|
// Updated time
|
||
|
// required: true
|
||
|
UpdateAt int64 `json:"updateAt"`
|
||
|
}
|
||
|
|
||
|
func TeamFromJSON(data io.Reader) *Team {
|
||
|
var team *Team
|
||
|
_ = json.NewDecoder(data).Decode(&team)
|
||
|
return team
|
||
|
}
|
||
|
|
||
|
func TeamsFromJSON(data io.Reader) []*Team {
|
||
|
var teams []*Team
|
||
|
_ = json.NewDecoder(data).Decode(&teams)
|
||
|
return teams
|
||
|
}
|