added basic skeleton and two API endpoints to test backend stack.
This commit is contained in:
@@ -13,5 +13,5 @@ type Item struct {
|
||||
CreatedTime time.Time
|
||||
AcquiredTime *time.Time
|
||||
ScheduledDate *time.Time
|
||||
Stats StatProgressEntry[]
|
||||
Stats []StatProgressEntry
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package models
|
||||
|
||||
type ScopeEntry struct {
|
||||
ID string `json:"id"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Abbreviation string `json:"abbreviation"`
|
||||
}
|
||||
@@ -18,5 +18,15 @@ type Scope struct {
|
||||
DisplayName string `json:"displayName"`
|
||||
Members []ScopeMember `json:"members"`
|
||||
Projects []ProjectEntry `json:"projects"`
|
||||
Stat []Stat `json:"stat"`
|
||||
Stats []Stat `json:"stats"`
|
||||
}
|
||||
|
||||
func (s *Scope) HasMember(id string) bool {
|
||||
for _, user := range s.Members {
|
||||
if user.ID == id {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package models
|
||||
|
||||
type StatEntry struct {
|
||||
ID string `json:"id"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Weight float64 `json:"weight"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user