Loggest thy stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
624 B

package models
type ScopeEntry struct {
ID int `json:"id"`
Name string `json:"name"`
Abbreviation string `json:"abbreviation"`
}
type ScopeMember struct {
ID string `json:"id"`
Name string `json:"name"`
Owner bool `json:"owner"`
}
type Scope struct {
ScopeEntry
DisplayName string `json:"displayName"`
Members []ScopeMember `json:"members"`
Projects []ProjectEntry `json:"projects"`
Stats []Stat `json:"stats"`
}
func (s *Scope) HasMember(id string) bool {
for _, user := range s.Members {
if user.ID == id {
return true
}
}
return false
}