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
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:
@@ -2,12 +2,12 @@ package database
|
|||||||
|
|
||||||
// CalendarMigrations creates the three calendar tables for Phase 9a:
|
// CalendarMigrations creates the three calendar tables for Phase 9a:
|
||||||
//
|
//
|
||||||
// cal_public_event — read-only snapshot of school holidays + public
|
// cal_public_event — read-only snapshot of school holidays + public
|
||||||
// holidays from OpenHolidaysAPI. Imported on first
|
// holidays from OpenHolidaysAPI. Imported on first
|
||||||
// boot via seed/calendar_holidays.json.
|
// boot via seed/calendar_holidays.json.
|
||||||
// cal_school_config — per-Rektor bundesland selection (1 row per user).
|
// cal_school_config — per-Rektor bundesland selection (1 row per user).
|
||||||
// cal_school_event — user-managed school events (Fortbildung,
|
// cal_school_event — user-managed school events (Fortbildung,
|
||||||
// Schulfeier, Klassenfahrt etc.).
|
// Schulfeier, Klassenfahrt etc.).
|
||||||
//
|
//
|
||||||
// cal_public_event is global (no created_by_user_id) because the data is the
|
// 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
|
// same for every school in a given bundesland. School-events are
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
// OpenHolidaysAPI. Global (no owner) — same for every school per region.
|
// OpenHolidaysAPI. Global (no owner) — same for every school per region.
|
||||||
type PublicEvent struct {
|
type PublicEvent struct {
|
||||||
ID uuid.UUID `json:"id" db:"id"`
|
ID uuid.UUID `json:"id" db:"id"`
|
||||||
Region string `json:"region" db:"region"` // e.g. "DE-NI"
|
Region string `json:"region" db:"region"` // e.g. "DE-NI"
|
||||||
EventType string `json:"event_type" db:"event_type"` // public_holiday | school_holiday
|
EventType string `json:"event_type" db:"event_type"` // public_holiday | school_holiday
|
||||||
NameDe string `json:"name_de" db:"name_de"`
|
NameDe string `json:"name_de" db:"name_de"`
|
||||||
NameEn string `json:"name_en,omitempty" db:"name_en"`
|
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"`
|
EndDate string `json:"end_date" db:"end_date"`
|
||||||
Source string `json:"source,omitempty" db:"source"`
|
Source string `json:"source,omitempty" db:"source"`
|
||||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||||
@@ -24,7 +24,7 @@ type PublicEvent struct {
|
|||||||
// (= one Rektor account). One row per user.
|
// (= one Rektor account). One row per user.
|
||||||
type SchoolCalendarConfig struct {
|
type SchoolCalendarConfig struct {
|
||||||
UserID uuid.UUID `json:"user_id" db:"user_id"`
|
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"`
|
SchoolYearStart *string `json:"school_year_start,omitempty" db:"school_year_start"`
|
||||||
SchoolYearEnd *string `json:"school_year_end,omitempty" db:"school_year_end"`
|
SchoolYearEnd *string `json:"school_year_end,omitempty" db:"school_year_end"`
|
||||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||||
|
|||||||
Reference in New Issue
Block a user