entities

package
v0.0.0-...-cef0962 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Course

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

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

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

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

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

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

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

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL