GoSkola24API/types/schools.go
2024-12-10 11:57:18 +01:00

46 lines
2.3 KiB
Go

/*
GoSkola24API
Copyright (C) 2024, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License version 3 for more details.
This program incorporates external libraries for certain functionalities.
These libraries are covered by their respective licenses, and their usage
agreements are as outlined in their respective documentation or source
code.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package types
// Holds data about a school
type School struct {
Name string `json:"name"` // Friendly-name of the school
SchoolId string `json:"schoolId"` // UUID identifying the school
HostName string `json:"hostName"` // The hostname (domain) that the school belongs to
AllowCalendarExport bool `json:"allowCalendarExport"` // Whether traditional calendar export is allowed, does not affect this module
AvailableData DataAvailability `json:"availableData"` // The types of data that the school provides
}
// Defines data availability, showing what type of data can be retrieved from an entity
type DataAvailability struct {
HasClasses bool `json:"hasClasses"` // Whether the school provides class data
HasCourses bool `json:"hasCourses"` // Whether the school provides course data
HasGroups bool `json:"hasGroups"` // Whether the school provides group data
HasResources bool `json:"hasResources"` // Whether the school provides resource data
HasRooms bool `json:"hasRooms"` // Whether the school provides room data
HasStudents bool `json:"hasStudents"` // Whether the school provides student data
HasSubjects bool `json:"hasSubjects"` // Whether the school provides subject data
HasTeachers bool `json:"hasTeachers"` // Whether the school provides teacher data
}