github.com/bensooraj/mattermost-server@v5.11.1+incompatible/model/team_stats.go (about) 1 // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package model 5 6 import ( 7 "encoding/json" 8 "io" 9 ) 10 11 type TeamStats struct { 12 TeamId string `json:"team_id"` 13 TotalMemberCount int64 `json:"total_member_count"` 14 ActiveMemberCount int64 `json:"active_member_count"` 15 } 16 17 func (o *TeamStats) ToJson() string { 18 b, _ := json.Marshal(o) 19 return string(b) 20 } 21 22 func TeamStatsFromJson(data io.Reader) *TeamStats { 23 var o *TeamStats 24 json.NewDecoder(data).Decode(&o) 25 return o 26 }