refactor: refactor SCThingTypes from union-type to enum. SCThingType-type-attributes are now string-type-attributes.

This commit is contained in:
Michel Jonathan Schmitz
2018-12-05 18:51:28 +01:00
parent 641eff15b8
commit f9056eeb33
25 changed files with 134 additions and 192 deletions

View File

@@ -16,16 +16,11 @@ import {SCAcademicDegree} from '../base/AcademicDegree';
import {SCAcademicPriceGroup,
SCThingThatCanBeOffered,
SCThingThatCanBeOfferedTranslatableProperties} from '../base/ThingThatCanBeOffered';
import {SCThingMeta} from '../Thing';
import {SCThingMeta, SCThingType} 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
*/
@@ -61,7 +56,7 @@ export interface SCCourseOfStudiesWithoutReferences extends
/**
* Type of the course of studies
*/
type: SCCourseOfStudiesType;
type: SCThingType.CourseOfStudies;
}
/**
@@ -83,6 +78,11 @@ export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences {
* Dates at which the course of studies is planned to start
*/
startDates?: SCDateSeriesWithoutReferences[];
/**
* Type of the course of studies
*/
type: SCThingType.CourseOfStudies;
}
export interface SCCourseOfStudiesTranslatableProperties