-
Notifications
You must be signed in to change notification settings - Fork 1
/
structs.go
92 lines (79 loc) · 1.99 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package main
type School struct {
Id int64
Name string `sql:"size:255"`
CountyId int64
DistrictId int64
Lat float64
Lon float64
}
type SchoolsByYear struct {
Year string
Schools []SchoolYear
}
type SchoolYear struct {
EnrollmentSize int64
School School
}
type District struct {
Id int64
Name string
CountyId int64
Schools []School
Lat float64
Lon float64
}
type SchoolWithEnrollment struct {
School School
EnrollmentByYear []EnrollmentByYear
}
//Class_Stats table
//id, schoolId, years, grade, maleStudents, femaleStudents, EnrollmentSize
type ClassStat struct {
Id int64
SchoolId int64
Years string
Grade string
MaleStudents int64
FemaleStudents int64
EnrollmentSize int64
}
type DistrictClassStats struct {
Id int64
DistrictId int64
Years string
Grade string
MaleStudents int64
FemaleStudents int64
EnrollmentSize int64
TeacherSize int64
}
//School_Stats table - already exists with this plus more
type SchoolStat struct {
SchoolId int64
Years string
EnrollmentSize int64
TeacherSize string
}
type DistrictWithYears struct {
District District
EnrollmentsByYear []EnrollmentByYear
}
type EnrollmentByYear struct {
Year string
Teachers int64
Students int64
GradeEnrollment []GradeEnrollment
}
type GradeEnrollment struct {
Grade string
EnrollmentSize int64
}
type DistrictsByYear struct {
Year string
Districts []DistrictYear
}
type DistrictYear struct {
EnrollmentSize int64
District District
}