diff --git a/src/core/Thing.ts b/src/core/Thing.ts index 41051dac..82e4fd92 100644 --- a/src/core/Thing.ts +++ b/src/core/Thing.ts @@ -28,6 +28,7 @@ export type SCThingTypes = 'article' | 'book' | 'building' | 'catalog' + | 'course of studies' | 'date series' | 'diff' | 'dish' diff --git a/src/core/things/CourseOfStudies.ts b/src/core/things/CourseOfStudies.ts new file mode 100644 index 00000000..92422c71 --- /dev/null +++ b/src/core/things/CourseOfStudies.ts @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2018 StApps + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. + * + * 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 General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +import {SCAcademicDegree} from '../base/AcademicDegree'; +import {SCAcademicPriceGroup, + SCThingThatCanBeOffered, + SCThingThatCanBeOfferedTranslatableProperties} from '../base/ThingThatCanBeOffered'; +import {SCThingMeta} from '../Thing'; +import {SCLanguage, SCTranslations} from '../types/i18n'; +import {SCDateSeriesWithoutReferences} from './DateSeries'; +import {SCOrganization} from './Organization'; + +/** + * Type of a course of studies + */ +export type SCCourseOfStudiesType = 'course of studies'; + +/** + * A course of studies without references + */ +export interface SCCourseOfStudiesWithoutReferences extends + SCAcademicDegree, + SCThingThatCanBeOffered { + /** + * The main language in which the course of studies + * is beeing offered + */ + mainLanguage: SCLanguage; + + /** + * Actual major of the course of studies (eg. physics) + */ + major: string; + + /** + * The modes the course of studies is offered in + */ + mode: SCCourseOfStudiesMode; + + /** + * The time modes the course of studies is offered in + */ + timeMode: SCCourseOfStudiesTimeMode; + + /** + * Translated fields of a dish + */ + translations?: SCTranslations; + + /** + * Type of the course of studies + */ + type: SCCourseOfStudiesType; +} + +/** + * A course of studies + */ +export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences { + /** + * The department that manages the course of studies + */ + department: SCOrganization; + + /** + * The secretary that administers requests and + * questions concerning the course of studies + */ + secretary: SCOrganization; + + /** + * Dates at which the course of studies is planned to start + */ + startDates?: SCDateSeriesWithoutReferences[]; +} + +export interface SCCourseOfStudiesTranslatableProperties + extends SCThingThatCanBeOfferedTranslatableProperties { +} + +/** + * course of studies meta data + */ +export class SCCourseOfStudiesMeta extends SCThingMeta { + static fieldTranslations = { + ...SCThingMeta.fieldTranslations, + de: { + academicDegree: 'Hochschulabschluss', + department: 'Fachbereich', + major: 'Studienfach', + modes: 'Studiengangsarten', + secretary: 'Sekretariat', + }, + }; + static fieldValueTranslations = { + ...SCThingMeta.fieldValueTranslations, + de: { + modes: { + combination: 'Kombinationsstudiengang', + dual: 'Dualer Studiengang', + fulltime: 'Vollzeitstudiengang', + parttime: 'Teilzeitstudiengang', + }, + type: 'Studiengang', + }, + }; +} + +/** + * Types of (german) course of studies modes + */ +export type SCCourseOfStudiesMode = 'combination' | + 'dual' | + 'double-degree' | + 'standard' ; + +/** + * Types of (german) course of studies time modes + */ +export type SCCourseOfStudiesTimeMode = 'fulltime' | + 'parttime' ;