package
Version:
v0.0.0-...-cef0962
Opens a new window with list of versions in this module.
Published: Mar 3, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Course struct {
gogm.Node `gogm:"label:Class"`
Name string `json:"name"`
Subject *Subject `gogm:"reltype:SUBJECT_TAUGHT" json:"subject"`
Teacher *Teacher `gogm:"reltype:TEACHES_CLASS,direction:<-" json:"teacher"`
Enrollments []*Enrollment `gogm:"reltype:ENROLLED,direction:<-" json:"enrollments"`
}
type Department struct {
gogm.Node
Name string `json:"name"`
Teachers []*Teacher `gogm:"reltype:DEPARTMENT_MEMBER" json:"teachers"`
Subjects []*Subject `gogm:"reltype:CURRICULUM" json:"subjects"`
}
type Enrollment struct {
gogm.Relationship `gogm:"reltype:ENROLLED"`
EnrolledDate *time.Time `json:"enrolledDate"`
Student *Student `gogm:"startNode" json:"student"`
Course *Course `gogm:"endNode" json:"course"`
}
type School struct {
gogm.Node `gogm:"label:Class"`
Name string `json:"student"`
Departments []*Department `gogm:"reltype:DEPARTMENT" json:"departments"`
Teachers []*Teacher `gogm:"reltype:STAFF" json:"teachers"`
HeadTeacher *Teacher `gogm:"reltype:HEAD_TEACHER" json:"teacher"`
Students []*Student `gogm:"reltype:STUDENT" json:"students"`
}
type Student struct {
gogm.Node
Name string `json:"name"`
Enrollments []*Enrollment `gogm:"reltype:ENROLLED" json:"enrollments"`
StudyBuddies []*StudyBuddy `gogm:"reltype:BUDDY,direction:->" json:"-"`
}
type StudyBuddy struct {
gogm.Node
Buddies []*Student `gogm:"reltype:BUDDY,direction:<-" json:"-"`
Course *Course `json:"course"`
BuddyOne *Student `gogm:"-" json:"buddyOne"`
BuddyTwo *Student `gogm:"-" json:"buddyTwo"`
}
type Subject struct {
gogm.Node
Name string `json:"name"`
Department *Department `gogm:"reltype:CURRICULUM,direction:<-" json:"-"`
Teachers []*Teacher `gogm:"reltype:TAUGHT_BY" json:"teachers"`
Courses []*Course `gogm:"reltype:SUBJECT_TAUGHT,direction:<-" json:"courses"`
}
type Teacher struct {
gogm.Node
Name string `json:"name"`
Courses []*Course `gogm:"reltype:TEACHES_CLASS" json:"courses"`
Department *Department `gogm:"reltype:DEPARTMENT_MEMBER,direction:<-" json:"department"`
Subjects []*Subject `gogm:"reltype:TAUGHT_BY,direction:<-" json:"subjects"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.