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

@@ -23,29 +23,31 @@ import {SCUuid} from './types/UUID';
/**
* Types a thing can be
*/
export type SCThingTypes = 'article'
| 'academic event'
| 'book'
| 'building'
| 'catalog'
| 'course of studies'
| 'date series'
| 'diff'
| 'dish'
| 'favorite'
| 'floor'
| 'message'
| 'offer'
| 'organization'
| 'person'
| 'point of interest'
| 'room'
| 'semester'
| 'setting'
| 'sport course'
| 'ticket'
| 'tour'
| 'video';
export enum SCThingType {
AcademicEvent = 'academic event',
Article = 'article',
Book = 'book',
Building = 'building',
Catalog = 'catalog',
CourseOfStudies = 'course of studies',
DateSeries = 'date series',
Diff = 'diff',
Dish = 'dish',
Favorite = 'favorite',
Floor = 'floor',
Message = 'message',
Offer = 'offer', // Currently not in use
Organization = 'organization',
Person = 'person',
PointOfInterest = 'point of interest',
Room = 'room',
Semester = 'semester',
Setting = 'setting',
SportCourse = 'sport course',
Ticket = 'ticket',
Tour = 'tour',
Video = 'video',
}
/**
* A thing
@@ -84,7 +86,7 @@ export interface SCThing {
/**
* Type of the thing
*/
type: SCThingTypes;
type: string;
/**
* Universally unique identifier of the thing
*/