2026-08-15 16:22:25 -07:00
|
|
|
package directory
|
|
|
|
|
|
|
|
|
|
type Person struct {
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
FullName string `json:"fullName"`
|
|
|
|
|
LegalName string `json:"legalName,omitempty"`
|
|
|
|
|
PreferredName string `json:"preferredName,omitempty"`
|
|
|
|
|
IsStaff bool `json:"isStaff"`
|
|
|
|
|
IsParent bool `json:"isParent"`
|
|
|
|
|
IsStudent bool `json:"isStudent"`
|
2026-08-15 23:07:09 -07:00
|
|
|
IsNew bool `json:"isNew,omitempty"`
|
2026-08-15 16:22:25 -07:00
|
|
|
Pronouns string `json:"pronouns,omitempty"`
|
|
|
|
|
Facts string `json:"facts,omitempty"`
|
|
|
|
|
PronunciationURL string `json:"pronunciationUrl,omitempty"`
|
|
|
|
|
PhotoURL string `json:"photoUrl,omitempty"`
|
|
|
|
|
Grade string `json:"grade,omitempty"`
|
|
|
|
|
Classroom string `json:"classroom,omitempty"`
|
|
|
|
|
Section string `json:"section,omitempty"`
|
|
|
|
|
Phone string `json:"phone,omitempty"`
|
|
|
|
|
FamilyKey string `json:"familyKey,omitempty"`
|
|
|
|
|
ParentContactEmails []string `json:"parentContactEmails,omitempty"`
|
|
|
|
|
JobTitle string `json:"jobTitle,omitempty"`
|
|
|
|
|
Department string `json:"department,omitempty"`
|
|
|
|
|
GradeBand string `json:"gradeBand,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Family struct {
|
|
|
|
|
Key string `json:"key"`
|
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
|
Address string `json:"address,omitempty"`
|
2026-08-16 10:13:05 -07:00
|
|
|
Phone string `json:"phone,omitempty"`
|
2026-08-15 23:21:03 -07:00
|
|
|
Lat float64 `json:"lat,omitempty"`
|
|
|
|
|
Lng float64 `json:"lng,omitempty"`
|
2026-08-15 16:22:25 -07:00
|
|
|
PhotoURL string `json:"photoUrl,omitempty"`
|
|
|
|
|
PhotoCaption string `json:"photoCaption,omitempty"`
|
|
|
|
|
PronunciationURL string `json:"pronunciationUrl,omitempty"`
|
|
|
|
|
AdultEmails []string `json:"adultEmails,omitempty"`
|
|
|
|
|
KidEmails []string `json:"kidEmails,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Classroom struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
ImageURL string `json:"imageUrl,omitempty"`
|
|
|
|
|
HasSections bool `json:"hasSections"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Section struct {
|
|
|
|
|
Classroom string `json:"classroom"`
|
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
|
Teachers []string `json:"teachers,omitempty"`
|
|
|
|
|
GradeBand string `json:"gradeBand,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Grade struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
NextName string `json:"nextName,omitempty"`
|
|
|
|
|
Band string `json:"band,omitempty"`
|
|
|
|
|
NextBand string `json:"nextBand,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-15 18:08:31 -07:00
|
|
|
func (m *Model) DisplayName(email string) string {
|
|
|
|
|
for _, p := range m.People {
|
|
|
|
|
if p.Email == email {
|
|
|
|
|
return p.FullName
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return email
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-15 16:22:25 -07:00
|
|
|
type Model struct {
|
|
|
|
|
People []Person `json:"people"`
|
|
|
|
|
Families map[string]Family `json:"families"`
|
|
|
|
|
Classrooms []Classroom `json:"classrooms"`
|
|
|
|
|
Sections []Section `json:"sections"`
|
|
|
|
|
Grades []Grade `json:"grades"`
|
|
|
|
|
RoomParents map[string][]string `json:"roomParents"`
|
|
|
|
|
Departments []string `json:"departments"`
|
|
|
|
|
}
|