mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
feat: add schema for course of studies
This commit is contained in:
@@ -28,6 +28,7 @@ export type SCThingTypes = 'article'
|
||||
| 'book'
|
||||
| 'building'
|
||||
| 'catalog'
|
||||
| 'course of studies'
|
||||
| 'date series'
|
||||
| 'diff'
|
||||
| 'dish'
|
||||
|
||||
132
src/core/things/CourseOfStudies.ts
Normal file
132
src/core/things/CourseOfStudies.ts
Normal file
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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<SCAcademicPriceGroup> {
|
||||
/**
|
||||
* 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<SCCourseOfStudiesTranslatableProperties>;
|
||||
|
||||
/**
|
||||
* 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' ;
|
||||
Reference in New Issue
Block a user