schema

package
v0.0.0-...-2ef02f2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterQuery

func FilterQuery[F any](c *gin.Context) (bson.M, error)

Types

type AcademicSession

type AcademicSession struct {
	Name       string    `bson:"name" json:"name"`
	Start_date time.Time `bson:"start_date" json:"start_date"`
	End_date   time.Time `bson:"end_date" json:"end_date"`
}

type Assistant

type Assistant struct {
	First_name string `bson:"first_name" json:"first_name"`
	Last_name  string `bson:"last_name" json:"last_name"`
	Role       string `bson:"role" json:"role"`
	Email      string `bson:"email" json:"email"`
}

type ChoiceRequirement

type ChoiceRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Choices     *CollectionRequirement `bson:"choices" json:"choices"`
}

func NewChoiceRequirement

func NewChoiceRequirement(choices *CollectionRequirement) *ChoiceRequirement

type CollectionRequirement

type CollectionRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Name        string        `bson:"name" json:"name"`
	Required    int           `bson:"required" json:"required"`
	Options     []interface{} `bson:"options" json:"options"`
}

func NewCollectionRequirement

func NewCollectionRequirement(name string, required int, options []interface{}) *CollectionRequirement

func (*CollectionRequirement) UnmarshalBSON

func (cr *CollectionRequirement) UnmarshalBSON(data []byte) error

type CollectionRequirementIntermediate

type CollectionRequirementIntermediate struct {
	Name     string     `bson:"name"`
	Required int        `bson:"required"`
	Options  []bson.Raw `bson:"options"`
}

type ConsentRequirement

type ConsentRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Granter     string `bson:"granter" json:"granter"`
}

func NewConsentRequirement

func NewConsentRequirement(granter string) *ConsentRequirement

type CoreRequirement

type CoreRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	CoreFlag    string `bson:"core_flag" json:"core_flag"`
	Hours       int    `bson:"hours" json:"hours"`
}

func NewCoreRequirement

func NewCoreRequirement(coreFlag string, hours int) *CoreRequirement

type Course

type Course struct {
	Id                       primitive.ObjectID     `bson:"_id" json:"_id" schema:"-"`
	Subject_prefix           string                 `bson:"subject_prefix" json:"subject_prefix" schema:"subject_prefix"`
	Course_number            string                 `bson:"course_number" json:"course_number" schema:"course_number"`
	Title                    string                 `bson:"title" json:"title" schema:"title"`
	Description              string                 `bson:"description" json:"description" schema:"-"`
	Enrollment_reqs          string                 `bson:"enrollment_reqs" json:"enrollment_reqs" schema:"-"`
	School                   string                 `bson:"school" json:"school" schema:"school"`
	Credit_hours             string                 `bson:"credit_hours" json:"credit_hours" schema:"credit_hours"`
	Class_level              string                 `bson:"class_level" json:"class_level" schema:"class_level"`
	Activity_type            string                 `bson:"activity_type" json:"activity_type" schema:"activity_type"`
	Grading                  string                 `bson:"grading" json:"grading" schema:"grading"`
	Internal_course_number   string                 `bson:"internal_course_number" json:"internal_course_number" schema:"internal_course_number"`
	Prerequisites            *CollectionRequirement `bson:"prerequisites" json:"prerequisites" schema:"-"`
	Corequisites             *CollectionRequirement `bson:"corequisites" json:"corequisites" schema:"-"`
	Co_or_pre_requisites     *CollectionRequirement `bson:"co_or_pre_requisites" json:"co_or_pre_requisites" schema:"-"`
	Sections                 []primitive.ObjectID   `bson:"sections" json:"sections" schema:"-"`
	Lecture_contact_hours    string                 `bson:"lecture_contact_hours" json:"lecture_contact_hours" schema:"lecture_contact_hours"`
	Laboratory_contact_hours string                 `bson:"laboratory_contact_hours" json:"laboratory_contact_hours" schema:"laboratory_contact_hours"`
	Offering_frequency       string                 `bson:"offering_frequency" json:"offering_frequency" schema:"offering_frequency"`
	Catalog_year             string                 `bson:"catalog_year" json:"catalog_year" schema:"catalog_year"`
	Attributes               interface{}            `bson:"attributes" json:"attributes" schema:"-"`
}

type CourseRequirement

type CourseRequirement struct {
	Requirement    `bson:",inline" json:",inline"`
	ClassReference string `bson:"class_reference" json:"class_reference"`
	MinimumGrade   string `bson:"minimum_grade" json:"minimum_grade"`
}

func NewCourseRequirement

func NewCourseRequirement(classRef string, minGrade string) *CourseRequirement

type Degree

type Degree struct {
	Subtype            string                 `bson:"subtype" json:"subtype" schema:"subtype"`
	School             string                 `bson:"school" json:"school" schema:"school"`
	Name               string                 `bson:"name" json:"name" schema:"name"`
	Year               string                 `bson:"year" json:"year" schema:"year"`
	Abbreviation       string                 `bson:"abbreviation" json:"abbreviation" schema:"abbreviation"`
	MinimumCreditHours int                    `bson:"minimum_credit_hours" json:"minimum_credit_hours" schema:"minimum_credit_hours"`
	CatalogUri         string                 `bson:"catalog_uri" json:"catalog_uri" schema:"-"`
	Requirements       *CollectionRequirement `bson:"requirements" json:"requirements" schema:"-"`
}

type Evaluation

type Evaluation struct {
	Id                   primitive.ObjectID `bson:"_id" json:"_id"`
	CourseExperience     []EvaluationField  `bson:"course_experience" json:"course_experience"`
	InstructorExperience []EvaluationField  `bson:"instructor_experience" json:"instructor_experience"`
	StudentExperience    []EvaluationField  `bson:"student_experience" json:"student_experience"`
}

type EvaluationField

type EvaluationField struct {
	Description string                         `bson:"description" json:"description"`
	Percentages map[EvaluationResponse]float32 `bson:"percentages" json:"percentages"`
	Counts      map[EvaluationResponse]int     `bson:"counts" json:"counts"`
	Summary     EvaluationSummary              `bson:"summary" json:"summary"`
}

type EvaluationResponse

type EvaluationResponse int

5 Level Likert Item scale for evaluation responses

const (
	STRONGLY_DISAGREE EvaluationResponse = 1 << iota
	DISAGREE
	NEUTRAL
	AGREE
	STRONGLY_AGREE
)

type EvaluationSummary

type EvaluationSummary struct {
	Median            float32 `bson:"median" json:"median"`
	Mean              float32 `bson:"mean" json:"mean"`
	StandardDeviation float32 `bson:"standard_deviation" json:"standard_deviation"`
	Responses         int     `bson:"responses" json:"responses"`
}

type Event

type Event struct {
	Id                 primitive.ObjectID `bson:"_id" json:"_id"`
	Summary            string             `bson:"summary" json:"summary"`
	Location           string             `bson:"location" json:"location"`
	StartTime          time.Time          `bson:"start_time" json:"start_time"`
	EndTime            time.Time          `bson:"end_time" json:"end_time"`
	Description        string             `bson:"description" json:"description"`
	EventType          []string           `bson:"event_type" json:"event_type"`
	TargetAudience     []string           `bson:"target_audience" json:"target_audience"`
	Topic              []string           `bson:"topic" json:"topic"`
	EventTags          []string           `bson:"event_tags" json:"event_tags"`
	EventWebsite       string             `bson:"event_website" json:"event_website"`
	Department         []string           `bson:"department" json:"department"`
	ContactName        string             `bson:"contact_name" json:"contact_name"`
	ContactEmail       string             `bson:"contact_email" json:"contact_email"`
	ContactPhoneNumber string             `bson:"contact_phone_number" json:"contact_phone_number"`
}

type ExamRequirement

type ExamRequirement struct {
	Requirement   `bson:",inline" json:",inline"`
	ExamReference string  `bson:"exam_reference" json:"exam_reference"`
	MinimumScore  float64 `bson:"minimum_score" json:"minimum_score"`
}

func NewExamRequirement

func NewExamRequirement(examRef string, minScore float64) *ExamRequirement

type GPARequirement

type GPARequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Minimum     float64 `bson:"minimum" json:"minimum"`
	Subset      string  `bson:"subset" json:"subset"`
}

func NewGPARequirement

func NewGPARequirement(min float64, subset string) *GPARequirement

type HoursRequirement

type HoursRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Required    int                  `bson:"required" json:"required"`
	Options     []*CourseRequirement `bson:"options" json:"options"`
}

func NewHoursRequirement

func NewHoursRequirement(required int, options []*CourseRequirement) *HoursRequirement

type LimitRequirement

type LimitRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	MaxHours    int `bson:"max_hours" json:"max_hours"`
}

func NewLimitRequirement

func NewLimitRequirement(maxHours int) *LimitRequirement

type Location

type Location struct {
	Building string `bson:"building" json:"building"`
	Room     string `bson:"room" json:"room"`
	Map_uri  string `bson:"map_uri" json:"map_uri"`
}

type MajorRequirement

type MajorRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Major       string `bson:"major" json:"major"`
}

func NewMajorRequirement

func NewMajorRequirement(major string) *MajorRequirement

type Meeting

type Meeting struct {
	Start_date   time.Time `bson:"start_date" json:"start_date"`
	End_date     time.Time `bson:"end_date" json:"end_date"`
	Meeting_days []string  `bson:"meeting_days" json:"meeting_days"`
	Start_time   string    `bson:"start_time" json:"start_time"`
	End_time     string    `bson:"end_time" json:"end_time"`
	Modality     string    `bson:"modality" json:"modality"`
	Location     Location  `bson:"location" json:"location"`
}

type MinorRequirement

type MinorRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Minor       string `bson:"minor" json:"minor"`
}

func NewMinorRequirement

func NewMinorRequirement(minor string) *MinorRequirement

type Organization

type Organization struct {
	Id             primitive.ObjectID `bson:"_id" json:"_id"`
	Title          string             `bson:"title" json:"title"`
	Description    string             `bson:"description" json:"description"`
	Categories     []string           `bson:"categories" json:"categories"`
	President_name string             `bson:"president_name" json:"president_name"`
	Emails         []string           `bson:"emails" json:"emails"`
	Picture_data   string             `bson:"picture_data" json:"picture_data"`
}

type OtherRequirement

type OtherRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Description string `bson:"description" json:"description"`
	Condition   string `bson:"condition" json:"condition"`
}

func NewOtherRequirement

func NewOtherRequirement(description, condition string) *OtherRequirement

type Professor

type Professor struct {
	Id           primitive.ObjectID   `bson:"_id" json:"_id" schema:"-"`
	First_name   string               `bson:"first_name" json:"first_name" schema:"first_name"`
	Last_name    string               `bson:"last_name" json:"last_name" schema:"last_name"`
	Titles       []string             `bson:"titles" json:"titles" schema:"titles"`
	Email        string               `bson:"email" json:"email" schema:"email"`
	Phone_number string               `bson:"phone_number" json:"phone_number" schema:"phone_number"`
	Office       Location             `bson:"office" json:"office" schema:"-"`
	Profile_uri  string               `bson:"profile_uri" json:"profile_uri" schema:"-"`
	Image_uri    string               `bson:"image_uri" json:"image_uri" schema:"-"`
	Office_hours []Meeting            `bson:"office_hours" json:"office_hours" schema:"-"`
	Sections     []primitive.ObjectID `bson:"sections" json:"sections" schema:"-"`
}

type Requirement

type Requirement struct {
	Type string `bson:"type" json:"type"`
}

type Section

type Section struct {
	Id                    primitive.ObjectID     `bson:"_id" json:"_id" schema:"-"`
	Section_number        string                 `bson:"section_number" json:"section_number" schema:"section_number"`
	Course_reference      primitive.ObjectID     `bson:"course_reference" json:"course_reference" schema:"course_reference"`
	Section_corequisites  *CollectionRequirement `bson:"section_corequisites" json:"section_corequisites" schema:"-"`
	Academic_session      AcademicSession        `bson:"academic_session" json:"academic_session" schema:"-"`
	Professors            []primitive.ObjectID   `bson:"professors" json:"professors" schema:"-"`
	Teaching_assistants   []Assistant            `bson:"teaching_assistants" json:"teaching_assistants" schema:"-"`
	Internal_class_number string                 `bson:"internal_class_number" json:"internal_class_number" schema:"internal_class_number"`
	Instruction_mode      string                 `bson:"instruction_mode" json:"instruction_mode" schema:"instruction_mode"`
	Meetings              []Meeting              `bson:"meetings" json:"meetings" schema:"-"`
	Core_flags            []string               `bson:"core_flags" json:"core_flags" schema:"-"`
	Syllabus_uri          string                 `bson:"syllabus_uri" json:"syllabus_uri" schema:"-"`
	Grade_distribution    []int                  `bson:"grade_distribution" json:"grade_distribution" schema:"-"`
	Attributes            interface{}            `bson:"attributes" json:"attributes" schema:"-"`
}

type SectionRequirement

type SectionRequirement struct {
	Requirement      `bson:",inline" json:",inline"`
	SectionReference primitive.ObjectID `bson:"section_reference" json:"section_reference"`
}

func NewSectionRequirement

func NewSectionRequirement(sectionRef primitive.ObjectID) *SectionRequirement

Jump to

Keyboard shortcuts

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