model

package
v1.165.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: BSD-3-Clause Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AddedPrimussAncode

type AddedPrimussAncode struct {
	Ancode        int               `json:"ancode"`
	PrimussAncode ZPAPrimussAncodes `json:"primuss_ancodes"`
}

type AnCode

type AnCode struct {
	Ancode int `json:"ancode"`
}

type AnnyBooking added in v1.77.0

type AnnyBooking struct {
	Number                 string     `json:"number" bson:"number"`
	StartDate              time.Time  `json:"startDate" bson:"start_date"`
	EndDate                time.Time  `json:"endDate" bson:"end_date"`
	BlockerStartDate       time.Time  `json:"blockerStartDate" bson:"blocker_start_date"`
	BlockerEndDate         time.Time  `json:"blockerEndDate" bson:"blocker_end_date"`
	ChargedDuration        int        `json:"chargedDuration" bson:"charged_duration"`
	Description            string     `json:"description" bson:"description"`
	CreatedAt              time.Time  `json:"createdAt" bson:"created_at"`
	UpdatedAt              time.Time  `json:"updatedAt" bson:"updated_at"`
	CanceledAt             *time.Time `json:"canceledAt,omitempty" bson:"canceled_at,omitempty"`
	Status                 string     `json:"status" bson:"status"`
	StatusReason           any        `json:"-" bson:"status_reason,omitempty"`
	IsBlocker              bool       `json:"isBlocker" bson:"is_blocker"`
	CanEdit                bool       `json:"canEdit" bson:"can_edit"`
	IsEditable             bool       `json:"isEditable" bson:"is_editable"`
	ManuallyCreated        bool       `json:"manuallyCreated" bson:"manually_created"`
	Note                   string     `json:"note" bson:"note"`
	Room                   string     `json:"room,omitempty" bson:"room,omitempty"`
	Self                   string     `json:"self" bson:"self"`
	PersonalizationName    string     `json:"personalizationName" bson:"personalization_name"`
	BookingGroupIdentifier string     `json:"bookingGroupIdentifier,omitempty" bson:"booking_group_identifier,omitempty"`
	CancelableUntil        *time.Time `json:"cancelableUntil,omitempty" bson:"cancelable_until,omitempty"`
	HasCustomDescription   bool       `json:"hasCustomDescription" bson:"has_custom_description"`
	ResourceID             string     `json:"-" bson:"resource_id,omitempty"`
}

type BalanceReport added in v1.98.0

type BalanceReport struct {
	Satisfied       bool `json:"satisfied"`
	Invigilators    int  `json:"invigilators"`
	ToleranceMin    int  `json:"toleranceMin"`
	WithinTolerance int  `json:"withinTolerance"`
	Over            int  `json:"over"`
	Under           int  `json:"under"`
	MaxOver         int  `json:"maxOver"`
	MaxUnder        int  `json:"maxUnder"`
}

BalanceReport: are all invigilators within ±tolerance of their target minutes.

type BlockedRoom added in v1.119.0

type BlockedRoom struct {
	Room   string  `json:"room"`
	Day    int     `json:"day"`
	Slot   int     `json:"slot"`
	Reason *string `json:"reason,omitempty"`
}

A room blocked for one slot (not usable for planning there).

type Conflict

type Conflict struct {
	AnCode        int `json:"ancode"`
	NumberOfStuds int `json:"numberOfStuds"`
}

type ConflictPerProgram

type ConflictPerProgram struct {
	Program   string      `json:"program"`
	Conflicts []*Conflict `json:"conflicts"`
}

type Conflicts

type Conflicts struct {
	AnCode     int         `json:"ancode"`
	Module     string      `json:"module"`
	MainExamer string      `json:"mainExamer"`
	Conflicts  []*Conflict `json:"conflicts"`
}

type ConflictsPerProgramAncode

type ConflictsPerProgramAncode struct {
	Program   string     `json:"program"`
	Ancode    int        `json:"ancode"`
	Conflicts *Conflicts `json:"conflicts,omitempty"`
}

type ConnectedExam

type ConnectedExam struct {
	ZpaExam           *ZPAExam       `json:"zpaExam"`
	PrimussExams      []*PrimussExam `json:"primussExams"`
	OtherPrimussExams []*PrimussExam `json:"otherPrimussExams"`
	Errors            []string       `json:"errors"`
}

type Constraints

type Constraints struct {
	Ancode          int              `json:"ancode"`
	NotPlannedByMe  bool             `json:"notPlannedByMe"`
	ExcludeDays     []*time.Time     `json:"excludeDays,omitempty"`
	PossibleDays    []*time.Time     `json:"possibleDays,omitempty"`
	FixedDay        *time.Time       `json:"fixedDay,omitempty"`
	FixedTime       *time.Time       `json:"fixedTime,omitempty"`
	SameSlot        []int            `json:"sameSlot,omitempty"`
	Online          bool             `json:"online"`
	RoomConstraints *RoomConstraints `json:"roomConstraints,omitempty"`
}

type ConstraintsInput added in v1.20.0

type ConstraintsInput struct {
	AllowedRooms     []string     `json:"allowedRooms,omitempty"`
	NotPlannedByMe   *bool        `json:"notPlannedByMe,omitempty"`
	ExcludeDays      []*time.Time `json:"excludeDays,omitempty"`
	PossibleDays     []*time.Time `json:"possibleDays,omitempty"`
	FixedDay         *time.Time   `json:"fixedDay,omitempty"`
	FixedTime        *time.Time   `json:"fixedTime,omitempty"`
	SameSlot         []int        `json:"sameSlot,omitempty"`
	Online           *bool        `json:"online,omitempty"`
	PlacesWithSocket *bool        `json:"placesWithSocket,omitempty"`
	Lab              *bool        `json:"lab,omitempty"`
	Exahm            *bool        `json:"exahm,omitempty"`
	Seb              *bool        `json:"seb,omitempty"`
	KdpJiraURL       *string      `json:"kdpJiraURL,omitempty"`
	MaxStudents      *int         `json:"maxStudents,omitempty"`
	Comments         *string      `json:"comments,omitempty"`
}

type CoverageReport added in v1.98.0

type CoverageReport struct {
	Positions int `json:"positions"`
	Unfilled  int `json:"unfilled"`
}

CoverageReport: how many positions are filled.

type DistributionBucket added in v1.98.0

type DistributionBucket struct {
	Count        int `json:"count"`
	Invigilators int `json:"invigilators"`
}

type EmailAttachmentInfo added in v1.102.0

type EmailAttachmentInfo struct {
	Kind        string    `json:"kind"`
	Key         string    `json:"key"`
	Filename    string    `json:"filename"`
	ContentType string    `json:"contentType"`
	Size        int       `json:"size"`
	UploadedAt  time.Time `json:"uploadedAt"`
}

EmailAttachmentInfo describes one uploaded attachment (without its binary data). kind is e.g. "cover-page" or "invigilation-image"; key is the teacher / invigilator id the attachment belongs to. The binaries themselves are uploaded via the REST endpoints /upload/email-attachment and /upload/email-attachments-zip.

type Emails added in v1.12.0

type Emails struct {
	Profs            string   `json:"profs"`
	Lbas             string   `json:"lbas"`
	LbasLastSemester string   `json:"lbasLastSemester"`
	AdditionalExamer []string `json:"additionalExamer"`
	Fs               string   `json:"fs"`
	Sekr             string   `json:"sekr"`
	// Recipient for building-management room requests (Gebäudemanagement).
	RoomManagement string `json:"roomManagement"`
	// Recipient for the EXaHM/SEB room overview (KDP).
	Kdp string `json:"kdp"`
	// Recipient for the overview of LBAs' repeat exams (Lehrbeauftragten-Beauftragte:r).
	Lbaba string `json:"lbaba"`
}

type EmailsInput added in v1.158.0

type EmailsInput struct {
	Profs            string   `json:"profs"`
	Lbas             string   `json:"lbas"`
	LbasLastSemester string   `json:"lbasLastSemester"`
	AdditionalExamer []string `json:"additionalExamer"`
	Fs               string   `json:"fs"`
	Sekr             string   `json:"sekr"`
	RoomManagement   string   `json:"roomManagement"`
	Kdp              string   `json:"kdp"`
	Lbaba            string   `json:"lbaba"`
}

type EnhancedPrimussExam

type EnhancedPrimussExam struct {
	Exam        *PrimussExam          `json:"exam"`
	StudentRegs []*EnhancedStudentReg `json:"studentRegs"`
	Conflicts   []*Conflict           `json:"conflicts"`
	Ntas        []*NTA                `json:"ntas"`
}

type EnhancedStudentReg added in v1.62.0

type EnhancedStudentReg struct {
	Mtknr      string      `json:"mtknr"`
	Ancode     int         `json:"ancode"`
	Program    string      `json:"program"`
	Group      string      `json:"group"`
	Name       string      `json:"name"`
	Presence   string      `json:"presence"`
	ZpaStudent *ZPAStudent `json:"zpaStudent,omitempty"`
}

type ExamDay

type ExamDay struct {
	Number int       `json:"number"`
	Date   time.Time `json:"date"`
}

type ExamTime added in v1.93.0

type ExamTime struct {
	From  time.Time `json:"from"`
	Until time.Time `json:"until"`
}

ExamTime is the time span of one exam an invigilator is the main examer of: from the start time of the slot until the end time (start + maxDuration of the exam, i.e. the longest exam in the slot including NTA extensions).

type ExamWithRegsAndRooms

type ExamWithRegsAndRooms struct {
	Exam              *PlannedExam   `json:"exam"`
	NormalRegsMtknr   []string       `json:"normalRegsMtknr"`
	NtasInNormalRooms []*NTA         `json:"ntasInNormalRooms"`
	NtasInAloneRooms  []*NTA         `json:"ntasInAloneRooms"`
	Rooms             []*PlannedRoom `json:"rooms"`
}

type ExamerInPlan

type ExamerInPlan struct {
	MainExamer   string `json:"mainExamer"`
	MainExamerID int    `json:"mainExamerID"`
}

type FK07Program

type FK07Program struct {
	Name string `json:"name"`
}

type FairnessDistribution added in v1.98.0

type FairnessDistribution struct {
	Kind    string                `json:"kind"`
	Total   int                   `json:"total"`
	Max     int                   `json:"max"`
	Buckets []*DistributionBucket `json:"buckets"`
}

FairnessDistribution: per-invigilator count histogram for one kind (reserve/nta). buckets reads as "count:invigilators", e.g. count 1 / invigilators 48.

type GeneratedExam

type GeneratedExam struct {
	Ancode           int                    `json:"ancode"`
	ZpaExam          *ZPAExam               `json:"zpaExam"`
	PrimussExams     []*EnhancedPrimussExam `json:"primussExams"`
	Constraints      *Constraints           `json:"constraints,omitempty"`
	Conflicts        []*ZPAConflict         `json:"conflicts"`
	StudentRegsCount int                    `json:"studentRegsCount"`
	Ntas             []*NTA                 `json:"ntas"`
	MaxDuration      int                    `json:"maxDuration"`
}

type Invigilation

type Invigilation struct {
	RoomName           *string `json:"roomName,omitempty"`
	Duration           int     `json:"duration"`
	InvigilatorID      int     `json:"invigilatorID"`
	Slot               *Slot   `json:"slot"`
	IsReserve          bool    `json:"isReserve"`
	IsSelfInvigilation bool    `json:"isSelfInvigilation"`
	PrePlanned         bool    `json:"prePlanned"`
}

type InvigilationReport added in v1.98.0

type InvigilationReport struct {
	Seed          int                     `json:"seed"`
	Iterations    int                     `json:"iterations"`
	IterationsRun int                     `json:"iterationsRun"`
	StoppedEarly  bool                    `json:"stoppedEarly"`
	Balance       *BalanceReport          `json:"balance"`
	Coverage      *CoverageReport         `json:"coverage"`
	Minutes       *MinutesReport          `json:"minutes"`
	Outliers      []*InvigilatorOutlier   `json:"outliers"`
	Fairness      []*FairnessDistribution `json:"fairness"`
	SoftCost      *SoftCostReport         `json:"softCost"`
}

InvigilationReport is the structured outcome of an invigilation generation run, mirroring the textual report. It is delivered once on the final RESULT line of the generateInvigilations subscription (also for dryRun, where nothing is written to the database).

type InvigilationSlot

type InvigilationSlot struct {
	Reserve *Teacher `json:"reserve,omitempty"`
	// true if the reserve invigilation in this slot is pre-planned (fixed).
	ReservePrePlanned     bool                   `json:"reservePrePlanned"`
	RoomsWithInvigilators []*RoomWithInvigilator `json:"roomsWithInvigilators"`
}

type InvigilationTimeWindow added in v1.91.0

type InvigilationTimeWindow struct {
	Date  time.Time  `json:"date"`
	From  *time.Time `json:"from,omitempty"`
	Until *time.Time `json:"until,omitempty"`
}

InvigilationTimeWindow restricts, for one calendar date, the times an invigilator may invigilate. An assigned invigilation must start no earlier than from (if set) and end no later than until (if set). The check is sub-slot granular and NTA-aware, since the end time includes the room's (possibly NTA-extended) duration.

type InvigilationTimeWindowInput added in v1.139.0

type InvigilationTimeWindowInput struct {
	Date  time.Time  `json:"date"`
	From  *time.Time `json:"from,omitempty"`
	Until *time.Time `json:"until,omitempty"`
}

date is the calendar day; from/until are clock times on that day (at least one of from/until must be set).

type InvigilationTodos

type InvigilationTodos struct {
	SumExamRooms                        int            `json:"sumExamRooms"`
	SumReserve                          int            `json:"sumReserve"`
	SumOtherContributions               int            `json:"sumOtherContributions"`
	SumOtherContributionsOvertimeCutted int            `json:"sumOtherContributionsOvertimeCutted"`
	InvigilatorCount                    int            `json:"invigilatorCount"`
	TodoPerInvigilator                  int            `json:"todoPerInvigilator"`
	TodoPerInvigilatorOvertimeCutted    int            `json:"todoPerInvigilatorOvertimeCutted"`
	Invigilators                        []*Invigilator `json:"invigilators"`
}

type Invigilator

type Invigilator struct {
	Teacher      *Teacher                 `json:"teacher"`
	Requirements *InvigilatorRequirements `json:"requirements,omitempty"`
	Todos        *InvigilatorTodos        `json:"todos,omitempty"`
}

type InvigilatorConstraints added in v1.139.0

type InvigilatorConstraints struct {
	TeacherID        int                       `json:"teacherID"`
	IsNotInvigilator bool                      `json:"isNotInvigilator"`
	ExcludedDates    []time.Time               `json:"excludedDates"`
	TimeWindows      []*InvigilationTimeWindow `json:"timeWindows"`
}

InvigilatorConstraints are the per-invigilator constraints kept in the DB and edited via the GUI, separate from the ZPA-sourced invigilator_requirements (which is overwritten on every ZPA pull). They are merged on top of the ZPA requirements when building an invigilator.

type InvigilatorConstraintsInput added in v1.139.0

type InvigilatorConstraintsInput struct {
	TeacherID        int                            `json:"teacherID"`
	IsNotInvigilator bool                           `json:"isNotInvigilator"`
	ExcludedDates    []*time.Time                   `json:"excludedDates"`
	TimeWindows      []*InvigilationTimeWindowInput `json:"timeWindows"`
}

type InvigilatorOutlier added in v1.98.0

type InvigilatorOutlier struct {
	InvigilatorID int     `json:"invigilatorID"`
	Doing         int     `json:"doing"`
	Target        int     `json:"target"`
	Open          int     `json:"open"`
	Percent       float64 `json:"percent"`
}

InvigilatorOutlier: a person whose assigned minutes are furthest from target.

type InvigilatorRequirements

type InvigilatorRequirements struct {
	ExcludedDates          []*time.Time `json:"excludedDates"`
	ExcludedDays           []int        `json:"excludedDays"`
	ExamTimes              []*ExamTime  `json:"examTimes"`
	ExamDays               []int        `json:"examDays"`
	PartTime               float64      `json:"partTime"`
	OralExamsContribution  int          `json:"oralExamsContribution"`
	LiveCodingContribution int          `json:"liveCodingContribution"`
	MasterContribution     int          `json:"masterContribution"`
	FreeSemester           float64      `json:"freeSemester"`
	OvertimeLastSemester   float64      `json:"overtimeLastSemester"`
	OvertimeThisSemester   float64      `json:"overtimeThisSemester"`
	AllContributions       int          `json:"allContributions"`
	Factor                 float64      `json:"factor"`
	// fromZpa is false if the invigilator has not yet entered their requirements in
	// the ZPA. In that case default requirements (full time, no contributions) are
	// used and the invigilator still has to provide their real requirements.
	FromZpa     bool                      `json:"fromZpa"`
	TimeWindows []*InvigilationTimeWindow `json:"timeWindows"`
}

type InvigilatorTodos

type InvigilatorTodos struct {
	TotalMinutes     int             `json:"totalMinutes"`
	DoingMinutes     int             `json:"doingMinutes"`
	Enough           bool            `json:"enough"`
	InvigilationDays []int           `json:"invigilationDays,omitempty"`
	Invigilations    []*Invigilation `json:"invigilations,omitempty"`
}

type InvigilatorsForDay

type InvigilatorsForDay struct {
	Want []*Invigilator `json:"want"`
	Can  []*Invigilator `json:"can"`
}

type LogLevel added in v1.98.0

type LogLevel string

LogLevel classifies a streamed LogLine. PROGRESS lines are throttled optimizer snapshots and should be rendered in-place (like a spinner) instead of appended. DONE marks the final line of a stream.

const (
	LogLevelInfo     LogLevel = "INFO"
	LogLevelWarn     LogLevel = "WARN"
	LogLevelError    LogLevel = "ERROR"
	LogLevelProgress LogLevel = "PROGRESS"
	LogLevelResult   LogLevel = "RESULT"
	LogLevelDone     LogLevel = "DONE"
)

func (LogLevel) IsValid added in v1.98.0

func (e LogLevel) IsValid() bool

func (LogLevel) MarshalGQL added in v1.98.0

func (e LogLevel) MarshalGQL(w io.Writer)

func (LogLevel) MarshalJSON added in v1.98.0

func (e LogLevel) MarshalJSON() ([]byte, error)

func (LogLevel) String added in v1.98.0

func (e LogLevel) String() string

func (*LogLevel) UnmarshalGQL added in v1.98.0

func (e *LogLevel) UnmarshalGQL(v any) error

func (*LogLevel) UnmarshalJSON added in v1.98.0

func (e *LogLevel) UnmarshalJSON(b []byte) error

type LogLine added in v1.98.0

type LogLine struct {
	Level      LogLevel            `json:"level"`
	Text       string              `json:"text"`
	Progress   *OptimizerProgress  `json:"progress,omitempty"`
	Report     *InvigilationReport `json:"report,omitempty"`
	Validation *ValidationReport   `json:"validation,omitempty"`
}

LogLine is one streamed line of output. text carries the rendered line including ANSI color codes, so a terminal-like frontend can display it verbatim. progress is only set when level is PROGRESS; report is only set on the final RESULT line of an invigilation generation and carries the structured outcome.

type MinutesReport added in v1.98.0

type MinutesReport struct {
	WithinTolerance int `json:"withinTolerance"`
	Over            int `json:"over"`
	Under           int `json:"under"`
	ToleranceMin    int `json:"toleranceMin"`
}

MinutesReport: distribution of assigned vs. target minutes around the tolerance band.

type MucDaiExam

type MucDaiExam struct {
	PrimussAncode  int    `json:"primussAncode"`
	Module         string `json:"module"`
	MainExamer     string `json:"mainExamer"`
	MainExamerID   *int   `json:"mainExamerID,omitempty"`
	ExamType       string `json:"examType"`
	Duration       int    `json:"duration"`
	IsRepeaterExam bool   `json:"isRepeaterExam"`
	Program        string `json:"program"`
	PlannedBy      string `json:"plannedBy"`
}

type Mutation

type Mutation struct {
}

type NTA

type NTA struct {
	Name                 string  `bson:"name"`
	Email                *string `bson:"email"`
	Mtknr                string  `bson:"mtknr"`
	Compensation         string  `bson:"compensation"`
	DeltaDurationPercent int     `bson:"deltaDurationPercent"`
	NeedsRoomAlone       bool    `bson:"needsRoomAlone"`
	NeedsHardware        bool    `bson:"needsHardware"`
	Program              string  `bson:"program"`
	From                 string  `bson:"from"`
	Until                string  `bson:"until"`
	LastSemester         *string `bson:"lastSemester"`
	Deactivated          bool    `bson:"deactivated"`
}

func NtaInputToNta

func NtaInputToNta(ntaInput NTAInput) *NTA

type NTAInput

type NTAInput struct {
	Name                 string  `json:"name"`
	Email                *string `json:"email,omitempty"`
	Mtknr                string  `json:"mtknr"`
	Compensation         string  `json:"compensation"`
	DeltaDurationPercent int     `json:"deltaDurationPercent"`
	NeedsRoomAlone       bool    `json:"needsRoomAlone"`
	NeedsHardware        bool    `json:"needsHardware"`
	Program              string  `json:"program"`
	From                 string  `json:"from"`
	Until                string  `json:"until"`
}

type NTAWithRegs

type NTAWithRegs struct {
	Nta  *NTA                   `json:"nta"`
	Regs *StudentRegsPerStudent `json:"regs,omitempty"`
}

type NTAWithRegsByExam

type NTAWithRegsByExam struct {
	Exam *ZPAExam       `json:"exam"`
	Ntas []*NTAWithRegs `json:"ntas,omitempty"`
}

type NTAWithRegsByExamAndTeacher

type NTAWithRegsByExamAndTeacher struct {
	Teacher *Teacher             `json:"teacher"`
	Exams   []*NTAWithRegsByExam `json:"exams,omitempty"`
}

type NtaRoomAloneWaiver added in v1.131.0

type NtaRoomAloneWaiver struct {
	Mtknr  string `json:"mtknr"`
	Ancode int    `json:"ancode"`
	Reason string `json:"reason"`
}

type OptimizerProgress added in v1.98.0

type OptimizerProgress struct {
	Iteration int     `json:"iteration"`
	Total     int     `json:"total"`
	BestCost  float64 `json:"bestCost"`
	Balance   bool    `json:"balance"`
	Unfilled  int     `json:"unfilled"`
}

OptimizerProgress is the structured payload of a PROGRESS LogLine, mirroring the simulated-annealing optimizer snapshot.

type PermanentNonInvigilator added in v1.140.0

type PermanentNonInvigilator struct {
	TeacherID int `json:"teacherID"`
	// Name is a denormalized display name, so the entry stays readable even when
	// the teacher has left the FK07 invigilator pool (then they are no longer in
	// invigilatorCandidates and the GUI could not resolve a name).
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

PermanentNonInvigilator is a teacher who never does invigilation duty again (e.g. retired). Unlike the per-semester invigilator constraints, this lives in the global "plexams" database and therefore carries over from semester to semester. It always implies isNotInvigilator.

type PlanEntry

type PlanEntry struct {
	DayNumber    int        `json:"dayNumber"`
	SlotNumber   int        `json:"slotNumber"`
	ExternalTime *time.Time `json:"externalTime"`
	Ancode       int        `json:"ancode"`
	Locked       bool       `json:"locked"`
}

type Planer added in v1.164.0

type Planer struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type PlannedExam

type PlannedExam struct {
	Ancode           int                    `json:"ancode"`
	ZpaExam          *ZPAExam               `json:"zpaExam"`
	PrimussExams     []*EnhancedPrimussExam `json:"primussExams"`
	Constraints      *Constraints           `json:"constraints,omitempty"`
	Conflicts        []*ZPAConflict         `json:"conflicts"`
	StudentRegsCount int                    `json:"studentRegsCount"`
	Ntas             []*NTA                 `json:"ntas"`
	MaxDuration      int                    `json:"maxDuration"`
	PlanEntry        *PlanEntry             `json:"planEntry,omitempty"`
	PlannedRooms     []*PlannedRoom         `json:"plannedRooms,omitempty"`
}

type PlannedRoom

type PlannedRoom struct {
	Day               int      `json:"day"`
	Slot              int      `json:"slot"`
	RoomName          string   `json:"roomName"`
	Ancode            int      `json:"ancode"`
	Duration          int      `json:"duration"`
	Handicap          bool     `json:"handicap"`
	HandicapRoomAlone bool     `json:"handicapRoomAlone"`
	Reserve           bool     `json:"reserve"`
	StudentsInRoom    []string `json:"studentsInRoom"`
	NtaMtknr          *string  `json:"ntaMtknr,omitempty"`
	PrePlanned        bool     `json:"prePlanned,omitempty"`
}

type PlanningCondition added in v1.121.0

type PlanningCondition struct {
	Key   string `json:"key"`
	Title string `json:"title"`
	Phase string `json:"phase"`
	// true when the condition (milestone) is reached.
	Done bool `json:"done"`
	// If set, the area this condition gates while done (e.g. ROOMS, INVIGILATIONS); null if it is not a gate.
	Gate *PlanningGate `json:"gate,omitempty"`
}

type PlanningGate added in v1.121.0

type PlanningGate string

Areas that can be locked by a published gate.

const (
	PlanningGateRooms         PlanningGate = "ROOMS"
	PlanningGateInvigilations PlanningGate = "INVIGILATIONS"
)

func (PlanningGate) IsValid added in v1.121.0

func (e PlanningGate) IsValid() bool

func (PlanningGate) MarshalGQL added in v1.121.0

func (e PlanningGate) MarshalGQL(w io.Writer)

func (PlanningGate) MarshalJSON added in v1.121.0

func (e PlanningGate) MarshalJSON() ([]byte, error)

func (PlanningGate) String added in v1.121.0

func (e PlanningGate) String() string

func (*PlanningGate) UnmarshalGQL added in v1.121.0

func (e *PlanningGate) UnmarshalGQL(v any) error

func (*PlanningGate) UnmarshalJSON added in v1.121.0

func (e *PlanningGate) UnmarshalJSON(b []byte) error

type PlanningPhase added in v1.121.0

type PlanningPhase struct {
	Key        string               `json:"key"`
	Title      string               `json:"title"`
	Conditions []*PlanningCondition `json:"conditions"`
}

type PlanningState added in v1.121.0

type PlanningState struct {
	Phases []*PlanningPhase `json:"phases"`
	// Areas whose generation is currently locked because a gate condition is set.
	BlockedAreas []PlanningGate `json:"blockedAreas"`
}

type PreExam added in v1.23.0

type PreExam struct {
	ZpaExam     *ZPAExam     `json:"zpaExam"`
	Constraints *Constraints `json:"constraints,omitempty"`
	PlanEntry   *PlanEntry   `json:"planEntry,omitempty"`
}

type PrePlannedInvigilation added in v1.84.0

type PrePlannedInvigilation struct {
	InvigilatorID int     `json:"invigilatorID"`
	Day           int     `json:"day"`
	Slot          int     `json:"slot"`
	RoomName      *string `json:"roomName,omitempty"`
	IsReserve     bool    `json:"isReserve"`
}

PrePlannedInvigilation fixes an invigilator for a room (or the reserve) in a slot before the automatic invigilation planning runs. roomName is null for a reserve invigilation.

type PrePlannedRoom added in v1.33.0

type PrePlannedRoom struct {
	Ancode   int     `json:"ancode"`
	RoomName string  `json:"roomName"`
	Mtknr    *string `json:"mtknr,omitempty"`
	Reserve  bool    `json:"reserve"`
	// Optional exact number of students planned for this room; taken verbatim when generating.
	Seats *int `json:"seats,omitempty"`
}

type PreplanExam added in v1.160.0

type PreplanExam struct {
	// ID is a synthetic per-semester key (assigned on creation).
	ID       int    `json:"id" bson:"id"`
	ExamKind string `json:"examKind" bson:"examkind"` // "EXaHM" | "SEB"
	// ExamerID links to a Teacher; ExamerName is a snapshot for display.
	ExamerID         int      `json:"examerID" bson:"examerid"`
	ExamerName       string   `json:"examerName" bson:"examername"`
	Module           string   `json:"module" bson:"module"`
	Programs         []string `json:"programs" bson:"programs"` // StudyProgram shortnames
	ExpectedStudents int      `json:"expectedStudents" bson:"expectedstudents"`
	Duration         *int     `json:"duration,omitempty" bson:"duration,omitempty"`
	// PlannedDayNumber / PlannedSlotNumber assign the pre-exam to a slot (both nil
	// = not yet slotted).
	PlannedDayNumber  *int `json:"plannedDayNumber,omitempty" bson:"planneddaynumber,omitempty"`
	PlannedSlotNumber *int `json:"plannedSlotNumber,omitempty" bson:"plannedslotnumber,omitempty"`
	// Ancode is set once the pre-exam is linked to a real ZPA exam (phase 4).
	Ancode *int   `json:"ancode,omitempty" bson:"ancode,omitempty"`
	Notes  string `json:"notes,omitempty" bson:"notes,omitempty"`
}

PreplanExam is a manually entered pseudo-exam for the SEB/EXaHM pre-planning of the (next) semester, captured before the ZPA exam list and Primuss data exist. It lives in the semester's own database (collection preplan_exams). Once the real ZPA exams are imported, a PreplanExam is linked to its ancode (phase 4).

type PreplanExamInput added in v1.160.0

type PreplanExamInput struct {
	ExamKind         string   `json:"examKind"`
	ExamerID         int      `json:"examerID"`
	Module           string   `json:"module"`
	Programs         []string `json:"programs"`
	ExpectedStudents int      `json:"expectedStudents"`
	Duration         *int     `json:"duration,omitempty"`
	Notes            *string  `json:"notes,omitempty"`
}

type PreplanKindNeed added in v1.160.0

type PreplanKindNeed struct {
	ExamCount   int `json:"examCount"`
	SeatsNeeded int `json:"seatsNeeded"`
	// Greedily suggested number of rooms of this kind to cover the seats.
	RoomsSuggested int `json:"roomsSuggested"`
	// Names of the suggested rooms (largest first).
	Rooms []string `json:"rooms"`
	// Total seats available across all rooms of this kind (per slot ceiling).
	SeatsAvailable int `json:"seatsAvailable"`
	// Seats already booked in Anny for this slot (0 for the unslotted bucket).
	SeatsBooked int `json:"seatsBooked"`
	// Rooms still to book in Anny to cover the demand (largest first); empty when enough is booked.
	RoomsToBook []string `json:"roomsToBook"`
}

type PreplanOverview added in v1.160.0

type PreplanOverview struct {
	Slots []*PreplanSlotNeed `json:"slots"`
}

type PreplanProgramConflict added in v1.160.0

type PreplanProgramConflict struct {
	Program        string   `json:"program"`
	PreplanExamIDs []int    `json:"preplanExamIDs"`
	Modules        []string `json:"modules"`
}

type PreplanSlotNeed added in v1.160.0

type PreplanSlotNeed struct {
	// null day/slot = the bucket of pre-exams without a slot yet.
	DayNumber  *int             `json:"dayNumber,omitempty"`
	SlotNumber *int             `json:"slotNumber,omitempty"`
	Starttime  *time.Time       `json:"starttime,omitempty"`
	Exahm      *PreplanKindNeed `json:"exahm"`
	Seb        *PreplanKindNeed `json:"seb"`
	// Programs that appear in more than one pre-exam of this slot (possible clash).
	Conflicts []*PreplanProgramConflict `json:"conflicts"`
}

type PreplanValidation added in v1.162.0

type PreplanValidation struct {
	// True when there are no findings (everything assigned, within capacity, no overlaps).
	Ok            bool `json:"ok"`
	AssignedCount int  `json:"assignedCount"`
	// ids of pre-exams without a slot.
	UnassignedIDs []int `json:"unassignedIDs"`
	// Human-readable findings (German).
	Messages []string `json:"messages"`
}

type PrimussExam

type PrimussExam struct {
	AnCode     int    `bson:"AnCode"`
	Module     string `bson:"Titel"`
	MainExamer string `bson:"pruefer"`
	Program    string `bson:"Stg"`
	ExamType   string `bson:"sonst"`
	Presence   string `bson:"ist_praesenz"`
}

type PrimussExamAncode

type PrimussExamAncode struct {
	Ancode        int    `json:"ancode"`
	Program       string `json:"program"`
	NumberOfStuds int    `json:"numberOfStuds"`
}

type PrimussExamByProgram

type PrimussExamByProgram struct {
	Program string                  `json:"program"`
	Exams   []*PrimussExamWithCount `json:"exams"`
}

type PrimussExamInput

type PrimussExamInput struct {
	Ancode  int    `json:"ancode"`
	Program string `json:"program"`
}

type PrimussExamWithCount

type PrimussExamWithCount struct {
	Ancode           int    `json:"ancode"`
	Module           string `json:"module"`
	MainExamer       string `json:"mainExamer"`
	Program          string `json:"program"`
	ExamType         string `json:"examType"`
	Presence         string `json:"presence"`
	StudentRegsCount int    `json:"studentRegsCount"`
}

type Query

type Query struct {
}

type RegWithError

type RegWithError struct {
	Registration *ZPAStudentReg      `json:"registration"`
	Error        *ZPAStudentRegError `json:"error"`
}

type RegWithProgram added in v1.57.0

type RegWithProgram struct {
	Program string `json:"program"`
	Reg     int    `json:"reg"`
}

type RemovedPrimussExam

type RemovedPrimussExam struct {
	AnCode  int    `bson:"AnCode"`
	Program string `bson:"Stg"`
}

type Room

type Room struct {
	Name             string `json:"name"`
	Seats            int    `json:"seats"`
	Handicap         bool   `json:"handicap"`
	Lab              bool   `json:"lab"`
	PlacesWithSocket bool   `json:"placesWithSocket"`
	// needsRequest is derived: true when requestWith is not NONE.
	NeedsRequest bool            `json:"needsRequest"`
	RequestWith  RoomRequestType `json:"requestWith"`
	// Lower number = preferred when generating room requests (e.g. R1.006/R1.046 = 1, R1.049 = 2).
	RequestPriority int  `json:"requestPriority"`
	Exahm           bool `json:"exahm"`
	Seb             bool `json:"seb"`
	SebSeats        *int `json:"sebSeats,omitempty"`
	HmebSeats       *int `json:"hmebSeats,omitempty"`
	Deactivated     bool `json:"deactivated"`
}

type RoomAndExam

type RoomAndExam struct {
	Room *PlannedRoom `json:"room"`
	Exam *ZPAExam     `json:"exam"`
}

type RoomConstraints

type RoomConstraints struct {
	AllowedRooms     []string `json:"allowedRooms,omitempty"`
	PlacesWithSocket bool     `json:"placesWithSocket"`
	Lab              bool     `json:"lab"`
	Exahm            bool     `json:"exahm"`
	Seb              bool     `json:"seb"`
	KdpJiraURL       *string  `json:"kdpJiraURL,omitempty"`
	MaxStudents      *int     `json:"maxStudents,omitempty"`
	Comments         *string  `json:"comments,omitempty"`
}

type RoomInSlotUsage added in v1.130.0

type RoomInSlotUsage struct {
	Ancode       int    `json:"ancode"`
	Module       string `json:"module"`
	Examer       string `json:"examer"`
	StudentCount int    `json:"studentCount"`
}

One exam's use of a room in a slot.

type RoomInput added in v1.113.0

type RoomInput struct {
	Name             string          `json:"name"`
	Seats            int             `json:"seats"`
	Handicap         bool            `json:"handicap"`
	Lab              bool            `json:"lab"`
	PlacesWithSocket bool            `json:"placesWithSocket"`
	RequestWith      RoomRequestType `json:"requestWith"`
	// Lower number = preferred when generating room requests. Optional; defaults to 0 (irrelevant when requestWith is NONE).
	RequestPriority int  `json:"requestPriority"`
	Exahm           bool `json:"exahm"`
	Seb             bool `json:"seb"`
	SebSeats        *int `json:"sebSeats,omitempty"`
	HmebSeats       *int `json:"hmebSeats,omitempty"`
}

type RoomRequest added in v1.115.0

type RoomRequest struct {
	Room     string    `json:"room"`
	Day      int       `json:"day"`
	Slot     int       `json:"slot"`
	From     time.Time `json:"from"`
	Until    time.Time `json:"until"`
	Approved bool      `json:"approved"`
	Active   bool      `json:"active"`
}

type RoomRequestPreview added in v1.116.0

type RoomRequestPreview struct {
	Room              string         `json:"room"`
	Day               int            `json:"day"`
	Slot              int            `json:"slot"`
	From              time.Time      `json:"from"`
	Until             time.Time      `json:"until"`
	Students          int            `json:"students"`
	Seats             int            `json:"seats"`
	Exam              *PlannedExam   `json:"exam"`
	SimultaneousExams []*PlannedExam `json:"simultaneousExams"`
}

RoomRequestPreview is one entry of the dry-run room-request generation: a management room that would be requested for an exam in a slot. It carries the triggering exam and the other (simultaneous) exams in that slot so the result can be eyeballed in the GUI. The preview is read-only and changes nothing.

type RoomRequestType added in v1.114.0

type RoomRequestType string

RoomRequestType says how a room that needs requesting must be requested: NONE = no request needed, ANNY = via the Anny website (T-building), MANAGEMENT = via the building management (Gebäudemanagement).

const (
	RoomRequestTypeNone       RoomRequestType = "NONE"
	RoomRequestTypeAnny       RoomRequestType = "ANNY"
	RoomRequestTypeManagement RoomRequestType = "MANAGEMENT"
)

func (RoomRequestType) IsValid added in v1.114.0

func (e RoomRequestType) IsValid() bool

func (RoomRequestType) MarshalGQL added in v1.114.0

func (e RoomRequestType) MarshalGQL(w io.Writer)

func (RoomRequestType) MarshalJSON added in v1.114.0

func (e RoomRequestType) MarshalJSON() ([]byte, error)

func (RoomRequestType) String added in v1.114.0

func (e RoomRequestType) String() string

func (*RoomRequestType) UnmarshalGQL added in v1.114.0

func (e *RoomRequestType) UnmarshalGQL(v any) error

func (*RoomRequestType) UnmarshalJSON added in v1.114.0

func (e *RoomRequestType) UnmarshalJSON(b []byte) error

type RoomWithFreeSeats added in v1.130.0

type RoomWithFreeSeats struct {
	RoomName  string `json:"roomName"`
	Seats     int    `json:"seats"`
	UsedSeats int    `json:"usedSeats"`
	FreeSeats int    `json:"freeSeats"`
	// handicap = true: NTA room, only for NTAs (not for normal students / non-NTA reserve).
	Handicap bool `json:"handicap"`
	Exahm    bool `json:"exahm"`
	Lab      bool `json:"lab"`
	Seb      bool `json:"seb"`
	// The exams already using this room in the slot (empty if the room is still free).
	UsedBy []*RoomInSlotUsage `json:"usedBy"`
}

A room allowed in a slot, with its free seats and the exams already using it.

type RoomWithInvigilator

type RoomWithInvigilator struct {
	Name         string         `json:"name"`
	MaxDuration  int            `json:"maxDuration"`
	StudentCount int            `json:"studentCount"`
	RoomAndExams []*RoomAndExam `json:"roomAndExams"`
	Invigilator  *Teacher       `json:"invigilator,omitempty"`
	// true if the invigilation for this room in this slot is pre-planned (fixed).
	PrePlanned bool `json:"prePlanned"`
}

type RoomsForSlot added in v1.31.0

type RoomsForSlot struct {
	Day       int      `json:"day"`
	Slot      int      `json:"slot"`
	RoomNames []string `json:"roomNames"`
}

type SaveSemesterConfigResult added in v1.158.0

type SaveSemesterConfigResult struct {
	Ok bool `json:"ok"`
	// Non-fatal warnings, e.g. changes that may invalidate an existing plan.
	Warnings []string `json:"warnings"`
}

type Semester

type Semester struct {
	ID string `json:"id"`
}

type SemesterConfig

type SemesterConfig struct {
	Days           []*ExamDay   `json:"days"`
	Starttimes     []*Starttime `json:"starttimes"`
	Slots          []*Slot      `json:"slots"`
	MucDaiSlotsRaw [][]int      `json:"mucDaiSlotsRaw,omitempty"`
	MucDaiSlots    []*Slot      `json:"mucDaiSlots"`
	ForbiddenSlots []*Slot      `json:"forbiddenSlots,omitempty"`
	From           time.Time    `json:"from"`
	Until          time.Time    `json:"until"`
	Emails         *Emails      `json:"emails"`
}

type SemesterConfigInput added in v1.158.0

type SemesterConfigInput struct {
	// From is the start of the planning period; day 1 = from. Exams of other
	// faculties may have earlier dates (or a negative day number); there is no
	// pre-period and no check for that.
	From  time.Time `json:"from" bson:"from"`
	Until time.Time `json:"until" bson:"until"`
	// Slots are the daily slot start times as "HH:MM".
	Slots []string `json:"slots" bson:"slots"`
	// ForbiddenDays are full days inside the planning window on which no exams may
	// be scheduled.
	ForbiddenDays []time.Time `json:"forbiddenDays,omitempty" bson:"forbiddenDays,omitempty"`
	// MucDaiSlots are the slots reserved for MUC.DAI exams, as absolute
	// [dayNumber, slotNumber] pairs (day 1 = from).
	MucDaiSlots [][]int `json:"mucDaiSlots,omitempty" bson:"mucDaiSlots,omitempty"`
	Emails      *Emails `json:"emails" bson:"emails"`
}

SemesterConfigInput holds the raw, editable per-semester configuration — the values that used to live in <semester>.yaml. It is the source of truth from which the derived SemesterConfig (days, slots, MUC.DAI slots, forbidden slots) is computed in deriveSemesterConfig. It is persisted in the per-semester DB (collection semester_config_input).

type SemesterConfigInputData added in v1.158.0

type SemesterConfigInputData struct {
	From          time.Time    `json:"from"`
	Until         time.Time    `json:"until"`
	Slots         []string     `json:"slots"`
	ForbiddenDays []*time.Time `json:"forbiddenDays,omitempty"`
	// MUC.DAI slots as absolute [dayNumber, slotNumber] pairs (day 1 = from).
	MucDaiSlots [][]int      `json:"mucDaiSlots,omitempty"`
	Emails      *EmailsInput `json:"emails"`
}

type Slot

type Slot struct {
	DayNumber  int       `json:"dayNumber"`
	SlotNumber int       `json:"slotNumber"`
	Starttime  time.Time `json:"starttime"`
}

type SlotInput added in v1.120.0

type SlotInput struct {
	Day  int `json:"day"`
	Slot int `json:"slot"`
}

A day/slot pair, used to block a room for several slots at once.

type SoftCostItem added in v1.98.0

type SoftCostItem struct {
	Name string  `json:"name"`
	Cost float64 `json:"cost"`
}

type SoftCostReport added in v1.98.0

type SoftCostReport struct {
	Total     float64         `json:"total"`
	Breakdown []*SoftCostItem `json:"breakdown"`
}

SoftCostReport: the weighted soft-constraint penalty score (lower is better).

type Starttime

type Starttime struct {
	Number int    `json:"number"`
	Start  string `json:"start"`
}

type Step

type Step struct {
	Number   int       `json:"number" mapstructure:"number"`
	Name     string    `json:"name" mapstructure:"step"`
	Done     bool      `json:"done" mapstructure:"done"`
	Deadline time.Time `json:"deadline" mapstructure:"deadline"`
}

type Student

type Student struct {
	Mtknr           string            `json:"mtknr"`
	Program         string            `json:"program"`
	Group           string            `json:"group"`
	Name            string            `json:"name"`
	Regs            []int             `json:"regs"`
	RegsWithProgram []*RegWithProgram `json:"regsWithProgram"`
	ZpaStudent      *ZPAStudent       `json:"zpaStudent,omitempty"`
	Nta             *NTA              `json:"nta,omitempty"`
}

type StudentReg

type StudentReg struct {
	Mtknr    string `bson:"MTKNR"`
	AnCode   int    `bson:"AnCode"`
	Program  string `bson:"Stg"`
	Group    string `bson:"Stgru"`
	Name     string `bson:"name"`
	Presence string `bson:"praesenz_fern"`
}

type StudentRegsForAncode

type StudentRegsForAncode struct {
	Exam        *ZPAExam                          `json:"exam"`
	StudentRegs []*StudentRegsPerAncodeAndProgram `json:"studentRegs"`
}

type StudentRegsPerAncode

type StudentRegsPerAncode struct {
	Ancode     int                               `json:"ancode"`
	PerProgram []*StudentRegsPerAncodeAndProgram `json:"perProgram"`
}

type StudentRegsPerAncodeAndProgram

type StudentRegsPerAncodeAndProgram struct {
	Program     string        `json:"program"`
	Ancode      int           `json:"ancode"`
	StudentRegs []*StudentReg `json:"studentRegs"`
}

type StudentRegsPerStudent

type StudentRegsPerStudent struct {
	Student *Student `json:"student"`
	Ancodes []int    `json:"ancodes"`
}

type StudyProgram added in v1.159.0

type StudyProgram struct {
	// Shortname (Kürzel, e.g. "IF") is the unique key.
	Shortname string `json:"shortname" bson:"shortname"`
	Name      string `json:"name" bson:"name"`
	// Degree, e.g. "Bachelor" / "Master" (optional).
	Degree *string `json:"degree,omitempty" bson:"degree,omitempty"`
	// Category groups the program by origin: "fk07" | "mucdai" | "misc".
	Category string `json:"category" bson:"category"`
	Active   bool   `json:"active" bson:"active"`
	// Retired marks a discontinued program. A retired fk07 program is treated as
	// an "old program" (no longer planned, but still relevant for old exams).
	Retired bool `json:"retired" bson:"retired"`
}

StudyProgram (Studiengang) is a first-class, semester-independent entity. It lives in the global "plexams" database and is used e.g. by the SEB/EXaHM pre-planning to foresee program overlaps before Primuss data exists. Until now programs were only strings derived from primuss collections / config.

type StudyProgramInput added in v1.159.0

type StudyProgramInput struct {
	Shortname string  `json:"shortname"`
	Name      string  `json:"name"`
	Degree    *string `json:"degree,omitempty"`
	Category  string  `json:"category"`
	Active    bool    `json:"active"`
	Retired   bool    `json:"retired"`
}

type Subscription added in v1.98.0

type Subscription struct {
}

type SyncChangeEntry added in v1.156.0

type SyncChangeEntry struct {
	Type   string             `json:"type"` // "added" | "removed" | "changed"
	Name   string             `json:"name"`
	Fields []*SyncFieldChange `json:"fields,omitempty"`
}

SyncChangeEntry is one added / removed / changed entry of an import. Fields is only set for changed entries.

type SyncFieldChange added in v1.156.0

type SyncFieldChange struct {
	Field string `json:"field"`
	Old   string `json:"old"`
	New   string `json:"new"`
}

SyncFieldChange is a single field that changed (old → new).

type SyncLogEntry added in v1.156.0

type SyncLogEntry struct {
	Time      time.Time `json:"time"`
	Operation string    `json:"operation"` // stable key, e.g. "zpa-import-exams", "zpa-upload-rooms", "anny-import"
	Label     string    `json:"label"`     // human-readable label
	Direction string    `json:"direction"` // "import" | "upload"
	System    string    `json:"system"`    // "ZPA" | "Anny" | …
	OK        bool      `json:"ok"`
	Summary   string    `json:"summary"`
	// For imports: how many entries were added / changed / removed, and the
	// per-entry detail. Empty / nil for uploads.
	Added   int                `json:"added"`
	Changed int                `json:"changed"`
	Removed int                `json:"removed"`
	Entries []*SyncChangeEntry `json:"entries,omitempty"`
}

SyncLogEntry records one external transfer (import from / upload to ZPA, Anny, …). The collection keeps the full history since the start of the semester, so the GUI can show the last sync per operation and a timeline.

type Teacher

type Teacher struct {
	Shortname    string `json:"person_shortname"`
	Fullname     string `json:"person_fullname"`
	IsProf       bool   `json:"is_prof"`
	IsLBA        bool   `json:"is_lba"`
	IsProfHC     bool   `json:"is_profhc"`
	IsStaff      bool   `json:"is_staff"`
	LastSemester string `json:"last_semester"`
	FK           string `json:"fk"`
	ID           int    `json:"person_id"`
	Email        string `json:"email"`
	IsActive     bool   `json:"is_active"`
}

type UnplacedExam added in v1.137.1

type UnplacedExam struct {
	Ancode   int      `json:"ancode"`
	Day      int      `json:"day"`
	Slot     int      `json:"slot"`
	Mtknrs   []string `json:"mtknrs"`
	NtaMtknr *string  `json:"ntaMtknr,omitempty"`
}

UnplacedExam records students of an exam that could not be assigned a real room in their slot during room generation. They are deliberately kept out of planned_rooms — which therefore only ever holds real rooms — and surfaced by the rooms validation (and the unplacedExams query) instead of a "No Room" placeholder room.

type ValidationFinding added in v1.99.0

type ValidationFinding struct {
	Level          ValidationLevel `json:"level"`
	Message        string          `json:"message"`
	Ancode         *int            `json:"ancode,omitempty"`
	RelatedAncodes []int           `json:"relatedAncodes,omitempty"`
	Room           *string         `json:"room,omitempty"`
	Day            *int            `json:"day,omitempty"`
	Slot           *int            `json:"slot,omitempty"`
	InvigilatorID  *int            `json:"invigilatorID,omitempty"`
	StudentMtknr   *string         `json:"studentMtknr,omitempty"`
}

ValidationFinding is one problem (or note) found by a validator. message is clean text (no ANSI); the optional reference fields let the GUI link a finding to the affected exam / room / slot / invigilator / student and render it as a row.

type ValidationLevel added in v1.99.0

type ValidationLevel string

ValidationLevel classifies a single validation finding.

const (
	ValidationLevelInfo    ValidationLevel = "INFO"
	ValidationLevelWarning ValidationLevel = "WARNING"
	ValidationLevelError   ValidationLevel = "ERROR"
)

func (ValidationLevel) IsValid added in v1.99.0

func (e ValidationLevel) IsValid() bool

func (ValidationLevel) MarshalGQL added in v1.99.0

func (e ValidationLevel) MarshalGQL(w io.Writer)

func (ValidationLevel) MarshalJSON added in v1.99.0

func (e ValidationLevel) MarshalJSON() ([]byte, error)

func (ValidationLevel) String added in v1.99.0

func (e ValidationLevel) String() string

func (*ValidationLevel) UnmarshalGQL added in v1.99.0

func (e *ValidationLevel) UnmarshalGQL(v any) error

func (*ValidationLevel) UnmarshalJSON added in v1.99.0

func (e *ValidationLevel) UnmarshalJSON(b []byte) error

type ValidationReport added in v1.99.0

type ValidationReport struct {
	Name         string               `json:"name"`
	Ok           bool                 `json:"ok"`
	ErrorCount   int                  `json:"errorCount"`
	WarningCount int                  `json:"warningCount"`
	InfoCount    int                  `json:"infoCount"`
	Findings     []*ValidationFinding `json:"findings"`
}

ValidationReport is the structured outcome of one validator. It is delivered on the final RESULT line of the validator's subscription (in LogLine.validation), while the human-readable lines stream before it.

type ZPAAncodes

type ZPAAncodes struct {
	Semester string `json:"semester"`
	AnCode   int    `json:"anCode"`
}

type ZPAConflict

type ZPAConflict struct {
	Ancode         int                  `json:"ancode"`
	NumberOfStuds  int                  `json:"numberOfStuds"`
	PrimussAncodes []*PrimussExamAncode `json:"primussAncodes"`
}

type ZPAExam

type ZPAExam struct {
	ZpaID          int                 `json:"id"`
	Semester       string              `json:"semester"`
	AnCode         int                 `json:"ancode"`
	Module         string              `json:"module"`
	MainExamer     string              `json:"main_examer"`
	MainExamerID   int                 `json:"main_examer_id"`
	ExamType       string              `json:"exam_type"`
	ExamTypeFull   string              `json:"full_name"`
	Date           string              `json:"date"`
	Starttime      string              `json:"start_time"`
	Duration       int                 `json:"duration"`
	IsRepeaterExam bool                `json:"is_repeater_exam"`
	Groups         []string            `json:"groups"`
	PrimussAncodes []ZPAPrimussAncodes `json:"primuss_ancodes"`
}

type ZPAExamPlan

type ZPAExamPlan struct {
	Semester             string             `json:"semester"`
	AnCode               int                `json:"anCode" bson:"ancode"`
	Date                 string             `json:"date"` // "19.07.2022"
	Time                 string             `json:"time"` // "14:30"
	StudentCount         int                `json:"total_number"`
	ReserveInvigilatorID int                `json:"reserveInvigilator_id"`
	Rooms                []*ZPAExamPlanRoom `json:"rooms"`
}

type ZPAExamPlanRoom

type ZPAExamPlanRoom struct {
	RoomName      string `json:"room_name"`
	InvigilatorID int    `json:"invigilator_id"`
	Duration      int    `json:"duration"`
	IsReserve     bool   `json:"reserveRoom"`
	StudentCount  int    `json:"numberStudents"`
	IsHandicap    bool   `json:"handicapCompensation"`
}

type ZPAExamWithConstraints

type ZPAExamWithConstraints struct {
	ZpaExam     *ZPAExam     `json:"zpaExam"`
	Constraints *Constraints `json:"constraints,omitempty"`
	PlanEntry   *PlanEntry   `json:"planEntry,omitempty"`
}

type ZPAExamsForType

type ZPAExamsForType struct {
	Type  string     `json:"type"`
	Exams []*ZPAExam `json:"exams"`
}

type ZPAInvigilator

type ZPAInvigilator struct {
	Teacher                  *Teacher `json:"teacher"`
	HasSubmittedRequirements bool     `json:"hasSubmittedRequirements"`
}

type ZPAPrimussAncodes

type ZPAPrimussAncodes struct {
	Program string `json:"program"`
	Ancode  int    `json:"ancode"`
}

type ZPAStudent

type ZPAStudent struct {
	Mtknr     string `json:"mtknr"`
	Greeting  string `json:"greeting"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
	Gender    string `json:"gender"`
	Group     string `json:"group"`
}

type ZPAStudentReg

type ZPAStudentReg struct {
	Semester string `json:"semester"`
	AnCode   int    `json:"anCode" bson:"ancode"`
	Mtknr    string `json:"matrikel"`
	Program  string `json:"program"`
}

type ZPAStudentRegError

type ZPAStudentRegError struct {
	Semester string `json:"semester"`
	AnCode   string `json:"anCode" bson:"ancode"`
	Exam     string `json:"exam"`
	Mtknr    string `json:"mtknr"`
	Program  string `json:"program"`
}

Jump to

Keyboard shortcuts

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