gofmt calendar files
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m25s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 21s

This commit is contained in:
Benjamin Admin
2026-05-22 09:47:37 +02:00
parent 97e37837ee
commit 09f6f5a5e1
2 changed files with 10 additions and 10 deletions
@@ -2,12 +2,12 @@ package database
// CalendarMigrations creates the three calendar tables for Phase 9a:
//
// cal_public_event — read-only snapshot of school holidays + public
// holidays from OpenHolidaysAPI. Imported on first
// boot via seed/calendar_holidays.json.
// cal_school_config — per-Rektor bundesland selection (1 row per user).
// cal_school_event — user-managed school events (Fortbildung,
// Schulfeier, Klassenfahrt etc.).
// cal_public_event — read-only snapshot of school holidays + public
// holidays from OpenHolidaysAPI. Imported on first
// boot via seed/calendar_holidays.json.
// cal_school_config — per-Rektor bundesland selection (1 row per user).
// cal_school_event — user-managed school events (Fortbildung,
// Schulfeier, Klassenfahrt etc.).
//
// cal_public_event is global (no created_by_user_id) because the data is the
// same for every school in a given bundesland. School-events are
+4 -4
View File
@@ -10,11 +10,11 @@ import (
// OpenHolidaysAPI. Global (no owner) — same for every school per region.
type PublicEvent struct {
ID uuid.UUID `json:"id" db:"id"`
Region string `json:"region" db:"region"` // e.g. "DE-NI"
EventType string `json:"event_type" db:"event_type"` // public_holiday | school_holiday
Region string `json:"region" db:"region"` // e.g. "DE-NI"
EventType string `json:"event_type" db:"event_type"` // public_holiday | school_holiday
NameDe string `json:"name_de" db:"name_de"`
NameEn string `json:"name_en,omitempty" db:"name_en"`
StartDate string `json:"start_date" db:"start_date"` // YYYY-MM-DD
StartDate string `json:"start_date" db:"start_date"` // YYYY-MM-DD
EndDate string `json:"end_date" db:"end_date"`
Source string `json:"source,omitempty" db:"source"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
@@ -24,7 +24,7 @@ type PublicEvent struct {
// (= one Rektor account). One row per user.
type SchoolCalendarConfig struct {
UserID uuid.UUID `json:"user_id" db:"user_id"`
Bundesland string `json:"bundesland" db:"bundesland"` // DE-NI ...
Bundesland string `json:"bundesland" db:"bundesland"` // DE-NI ...
SchoolYearStart *string `json:"school_year_start,omitempty" db:"school_year_start"`
SchoolYearEnd *string `json:"school_year_end,omitempty" db:"school_year_end"`
CreatedAt time.Time `json:"created_at" db:"created_at"`