timetable

package
v0.0.0-...-0fd7366 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBrowser

func NewBrowser() (context.CancelFunc, error)

Initializes the browser session used for pdf generation. The caller is responsible for termination.

Types

type VGroup

type VGroup struct {
	Name    string                 `json:"group_name"` // 1 - 500 characters
	Routine map[uint]VGroupRoutine `json:"routine"`    // required mapping of day (1-Monday to 7-Sunday) to routine
	Classes []VGroupClass          `json:"classes"`    // required

	LessonDurationInMinutes uint `json:"lesson_duration_in_minutes"` // minimum of 1
}

type VGroupClass

type VGroupClass struct {
	Name      string              `json:"class_name"`           // 1 - 100 characters
	TeacherId int                 `json:"teacher_in_charge_id"` // pre-specified teacher id
	Lessons   []VGroupClassLesson `json:"lessons"`              // required
}

type VGroupClassLesson

type VGroupClassLesson struct {
	SubjectId      int    `json:"subject_id"`       // pre-specified subject id
	TeacherId      int    `json:"teacher_id"`       // pre-specified teacher id
	MaxLessonCount uint32 `json:"max_lesson_count"` // optional maximum number of lessons in a week including the total count of mandatory specifics (specified duration is unconsidered).

	MandatorySpecifics map[uint][]string `json:"mandatory_specifics"` // optional mapping of day (1-Monday to 7-Sunday) to a list of time ranges (eg. '[9:00,11:00]'). within routine range & non-overlapping.
}

type VGroupRoutine

type VGroupRoutine struct {
	Period string            `json:"period"` // time range (eg. '[9:00,11:00]')
	Breaks map[string]string `json:"breaks"` // optional mapping of break name (1 - 100 chracters) to time range (eg. '[9:00,11:00]'). within routine range & non-overlapping.
}

type VSchool

type VSchool struct {
	Subjects map[int]string   `json:"subjects"` // required mapping of an id to subject name (1 - 30 characters).
	Teachers map[int]VTeacher `json:"teachers"` // required mapping of an id to teacher.
	Groups   []VGroup         `json:"groups"`   // required
}

func (*VSchool) Validate

func (s *VSchool) Validate() (*school, bool)

type VTeacher

type VTeacher struct {
	Name    string            `json:"teacher_name"` // 1 - 30 characters
	Routine map[uint][]string `json:"routine"`      // optional mapping of day (1-Monday to 7-Sunday) to a list of time ranges (eg. '[9:00,11:00]'). non-overlapping.
}

Jump to

Keyboard shortcuts

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