mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
fix: adjust model to remove references from things without references
Fixes #69
This commit is contained in:
@@ -12,39 +12,46 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCThingMeta} from '../Thing';
|
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An academic degree without references
|
* An academic degree without references
|
||||||
*/
|
*/
|
||||||
export interface SCAcademicDegreeWithoutReferences extends SCThing {
|
export interface SCAcademicDegreeWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree
|
* The achievable academic degree
|
||||||
*/
|
*/
|
||||||
academicDegree: SCGermanAcademicDegree;
|
academicDegree: SCGermanAcademicDegree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree with academic field specification
|
* The achievable academic degree with academic field specification
|
||||||
* (eg. Master of Science)
|
* (eg. Master of Science)
|
||||||
*/
|
*/
|
||||||
academicDegreewithField: string;
|
academicDegreewithField: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The achievable academic degree with academic field specification
|
* The achievable academic degree with academic field specification
|
||||||
* shorted (eg. M.Sc.).
|
* shorted (eg. M.Sc.).
|
||||||
*/
|
*/
|
||||||
academicDegreewithFieldShort: string;
|
academicDegreewithFieldShort: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SCAcademicDegree extends SCAcademicDegreeWithoutReferences {
|
/**
|
||||||
|
* An academic degree
|
||||||
|
*/
|
||||||
|
export interface SCAcademicDegree
|
||||||
|
extends SCAcademicDegreeWithoutReferences, SCThing {
|
||||||
|
// noop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about academic degrees
|
* Meta information about academic degrees
|
||||||
*/
|
*/
|
||||||
export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslations<SCAcademicDegree> {
|
export class SCAcademicDegreeMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCAcademicDegree> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
@@ -86,11 +93,12 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
|
|||||||
/**
|
/**
|
||||||
* Types of (german) academic degrees
|
* Types of (german) academic degrees
|
||||||
*/
|
*/
|
||||||
export type SCGermanAcademicDegree = 'bachelor' |
|
export type SCGermanAcademicDegree =
|
||||||
'diploma' |
|
'bachelor'
|
||||||
'doctor' |
|
| 'diploma'
|
||||||
'licentiate' |
|
| 'doctor'
|
||||||
'magister' |
|
| 'licentiate'
|
||||||
'master' |
|
| 'magister'
|
||||||
'master pupil' |
|
| 'master'
|
||||||
'state examination' ;
|
| 'master pupil'
|
||||||
|
| 'state examination' ;
|
||||||
|
|||||||
@@ -12,14 +12,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
import {SCISO8601Date} from '../types/Time';
|
import {SCISO8601Date} from '../types/Time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An academic term without references
|
* An academic term without references
|
||||||
*/
|
*/
|
||||||
export interface SCAcademicTermWithoutReferences extends SCThing {
|
export interface SCAcademicTermWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Short name of the academic term, using the given pattern
|
* Short name of the academic term, using the given pattern
|
||||||
*/
|
*/
|
||||||
@@ -46,31 +47,40 @@ export interface SCAcademicTermWithoutReferences extends SCThing {
|
|||||||
startDate: SCISO8601Date;
|
startDate: SCISO8601Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An academic term
|
||||||
|
*/
|
||||||
|
export interface SCAcademicTerm
|
||||||
|
extends SCAcademicTermWithoutReferences, SCThing {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about academic terms
|
* Meta information about academic terms
|
||||||
*/
|
*/
|
||||||
export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements SCMetaTranslations<SCThing> {
|
export class SCAcademicTermWithoutReferencesMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCThing> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
|
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCOrganizationWithoutReferences} from '../things/Organization';
|
import {SCOrganizationWithoutReferences} from '../things/Organization';
|
||||||
import {SCPersonWithoutReferences} from '../things/Person';
|
import {SCPersonWithoutReferences} from '../things/Person';
|
||||||
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
@@ -21,12 +21,14 @@ import {
|
|||||||
SCAcademicPriceGroup,
|
SCAcademicPriceGroup,
|
||||||
SCThingThatCanBeOffered,
|
SCThingThatCanBeOffered,
|
||||||
SCThingThatCanBeOfferedTranslatableProperties,
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
} from './ThingThatCanBeOffered';
|
} from './ThingThatCanBeOffered';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A creative work without references
|
* A creative work without references
|
||||||
*/
|
*/
|
||||||
export interface SCCreativeWorkWithoutReferences extends SCThing {
|
export interface SCCreativeWorkWithoutReferences
|
||||||
|
extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Date the creative work was published
|
* Date the creative work was published
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +53,8 @@ export interface SCCreativeWorkWithoutReferences extends SCThing {
|
|||||||
/**
|
/**
|
||||||
* A creative work
|
* A creative work
|
||||||
*/
|
*/
|
||||||
export interface SCCreativeWork extends SCCreativeWorkWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
export interface SCCreativeWork
|
||||||
|
extends SCCreativeWorkWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
||||||
/**
|
/**
|
||||||
* Authors of the creative work
|
* Authors of the creative work
|
||||||
*/
|
*/
|
||||||
@@ -82,28 +85,29 @@ export interface SCCreativeWorkTranslatableProperties
|
|||||||
/**
|
/**
|
||||||
* Meta information about creative works
|
* Meta information about creative works
|
||||||
*/
|
*/
|
||||||
export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslations<SCCreativeWork> {
|
export class SCCreativeWorkMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCCreativeWork> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCCatalogWithoutReferences} from '../things/Catalog';
|
import {SCCatalogWithoutReferences} from '../things/Catalog';
|
||||||
import {SCPersonWithoutReferences} from '../things/Person';
|
import {SCPersonWithoutReferences} from '../things/Person';
|
||||||
import {SCSemesterWithoutReferences} from '../things/Semester';
|
import {SCSemesterWithoutReferences} from '../things/Semester';
|
||||||
@@ -22,7 +22,8 @@ import {SCCreativeWorkWithoutReferences} from './CreativeWork';
|
|||||||
/**
|
/**
|
||||||
* An event without references
|
* An event without references
|
||||||
*/
|
*/
|
||||||
export interface SCEventWithoutReferences extends SCThing {
|
export interface SCEventWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Maximum number of participants of the event
|
* Maximum number of participants of the event
|
||||||
*
|
*
|
||||||
@@ -41,7 +42,8 @@ export interface SCEventWithoutReferences extends SCThing {
|
|||||||
/**
|
/**
|
||||||
* An event
|
* An event
|
||||||
*/
|
*/
|
||||||
export interface SCEvent extends SCEventWithoutReferences {
|
export interface SCEvent
|
||||||
|
extends SCEventWithoutReferences, SCThing {
|
||||||
/**
|
/**
|
||||||
* Academic terms that an event belongs to, e.g. semester(s).
|
* Academic terms that an event belongs to, e.g. semester(s).
|
||||||
*/
|
*/
|
||||||
@@ -73,28 +75,29 @@ export interface SCEvent extends SCEventWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about events
|
* Meta information about events
|
||||||
*/
|
*/
|
||||||
export class SCEventMeta extends SCThingMeta implements SCMetaTranslations<SCEvent> {
|
export class SCEventMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCEvent> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCGeoInformation} from '../types/GeoInformation';
|
import {SCGeoInformation} from '../types/GeoInformation';
|
||||||
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCPostalAddress} from '../types/PostalAddress';
|
import {SCPostalAddress} from '../types/PostalAddress';
|
||||||
@@ -20,7 +20,8 @@ import {SCPostalAddress} from '../types/PostalAddress';
|
|||||||
/**
|
/**
|
||||||
* A place without references
|
* A place without references
|
||||||
*/
|
*/
|
||||||
export interface SCPlaceWithoutReferences extends SCThing {
|
export interface SCPlaceWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Address of the place
|
* Address of the place
|
||||||
*/
|
*/
|
||||||
@@ -44,38 +45,53 @@ export interface SCPlaceWithoutReferences extends SCThing {
|
|||||||
* Translated fields of a place
|
* Translated fields of a place
|
||||||
*/
|
*/
|
||||||
translations?: SCTranslations<SCPlaceWithoutReferencesTranslatableProperties>;
|
translations?: SCTranslations<SCPlaceWithoutReferencesTranslatableProperties>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SCPlaceWithoutReferencesTranslatableProperties extends SCThingTranslatableProperties {
|
/**
|
||||||
|
* A place
|
||||||
|
*/
|
||||||
|
export interface SCPlace
|
||||||
|
extends SCPlaceWithoutReferences, SCThing {
|
||||||
|
/**
|
||||||
|
* Translated fields of a place
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCPlaceWithoutReferencesTranslatableProperties>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable properties of a place without references
|
||||||
|
*/
|
||||||
|
export interface SCPlaceWithoutReferencesTranslatableProperties
|
||||||
|
extends SCThingTranslatableProperties {
|
||||||
address?: SCPostalAddress;
|
address?: SCPostalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about creative works
|
* Meta information about creative works
|
||||||
*/
|
*/
|
||||||
export class SCPlaceWithoutReferencesMeta extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
|
export class SCPlaceWithoutReferencesMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,24 +12,27 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingUserOrigin} from '../Thing';
|
import {SCThing, SCThingUserOrigin, SCThingWithoutReferences} from '../Thing';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An encapsulation of the data (e.g. a thing) that is saved, which provides additional information.
|
* An encapsulation of the data (e.g. a thing) that is saved, which provides additional information.
|
||||||
*/
|
*/
|
||||||
export interface SCSaveableThingWithoutReferences extends SCThing {
|
export interface SCSaveableThingWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An encapsulation of the data (e.g. a thing) that is saved, which provides additional information.
|
||||||
|
*/
|
||||||
|
export interface SCSaveableThing<T extends SCThingWithoutReferences>
|
||||||
|
extends SCSaveableThingWithoutReferences, SCThing {
|
||||||
|
/**
|
||||||
|
* The contained data
|
||||||
|
*/
|
||||||
|
data: T;
|
||||||
/**
|
/**
|
||||||
* Type of the origin
|
* Type of the origin
|
||||||
*/
|
*/
|
||||||
origin: SCThingUserOrigin;
|
origin: SCThingUserOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* An encapsulation of the data (e.g. a thing) that is saved, which provides additional information.
|
|
||||||
*/
|
|
||||||
export interface SCSaveableThing<T extends SCThing> extends SCSaveableThingWithoutReferences {
|
|
||||||
/**
|
|
||||||
* The contained data
|
|
||||||
*/
|
|
||||||
data: T;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -19,22 +19,26 @@ import {SCInPlace} from '../types/Places';
|
|||||||
/**
|
/**
|
||||||
* A thing that is or happens in a place
|
* A thing that is or happens in a place
|
||||||
*/
|
*/
|
||||||
export interface SCThingInPlace extends SCThing, SCInPlace {}
|
export interface SCThingInPlace
|
||||||
|
extends SCThing, SCInPlace {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about thing in a place
|
* Meta information about thing in a place
|
||||||
*/
|
*/
|
||||||
export class SCThingInPlaceMeta extends SCThingMeta implements SCMetaTranslations<SCThingInPlace> {
|
export class SCThingInPlaceMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCThingInPlace> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
inPlace: 'Ort',
|
inPlace: 'Ort',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
inPlace: 'location',
|
inPlace: 'location',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -42,12 +46,12 @@ export class SCThingInPlaceMeta extends SCThingMeta implements SCMetaTranslation
|
|||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,41 +24,50 @@ export type SCThingThatAcceptsPaymentsAcceptedPayments =
|
|||||||
| 'Cafeteria Card';
|
| 'Cafeteria Card';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A place without references that accepts payments
|
* A thing without references that accepts payments
|
||||||
*/
|
*/
|
||||||
export interface SCThingThatAcceptsPaymentsWithoutReferences extends SCThing {
|
export interface SCThingThatAcceptsPaymentsWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Accepted payments of the place
|
* Accepted payments of the place
|
||||||
*/
|
*/
|
||||||
paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[];
|
paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A thing that accepts payments
|
||||||
|
*/
|
||||||
|
export interface SCThingThatAcceptsPayments
|
||||||
|
extends SCThingThatAcceptsPaymentsWithoutReferences, SCThing {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about a thing without references that accepts payments
|
* Meta information about a thing without references that accepts payments
|
||||||
*/
|
*/
|
||||||
export class SCThingThatAcceptsPaymentsWithoutReferencesMeta extends SCThingMeta implements
|
export class SCThingThatAcceptsPaymentsWithoutReferencesMeta
|
||||||
SCMetaTranslations<SCThingThatAcceptsPaymentsWithoutReferences> {
|
extends SCThingMeta implements SCMetaTranslations<SCThingThatAcceptsPaymentsWithoutReferences> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingTranslatableProperties} from '../Thing';
|
import {SCThing, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCOrganizationWithoutReferences} from '../things/Organization';
|
import {SCOrganizationWithoutReferences} from '../things/Organization';
|
||||||
import {SCPersonWithoutReferences} from '../things/Person';
|
import {SCPersonWithoutReferences} from '../things/Person';
|
||||||
import {SCTranslations} from '../types/i18n';
|
import {SCTranslations} from '../types/i18n';
|
||||||
@@ -32,7 +32,8 @@ export interface SCPriceGroup {
|
|||||||
/**
|
/**
|
||||||
* Price distinctions for academic context
|
* Price distinctions for academic context
|
||||||
*/
|
*/
|
||||||
export interface SCAcademicPriceGroup extends SCPriceGroup {
|
export interface SCAcademicPriceGroup
|
||||||
|
extends SCPriceGroup {
|
||||||
/**
|
/**
|
||||||
* Price for employees
|
* Price for employees
|
||||||
*/
|
*/
|
||||||
@@ -52,7 +53,8 @@ export interface SCAcademicPriceGroup extends SCPriceGroup {
|
|||||||
/**
|
/**
|
||||||
* A thing without references that can be offered
|
* A thing without references that can be offered
|
||||||
*/
|
*/
|
||||||
export interface SCThingThatCanBeOfferedWithoutReferences extends SCThing {
|
export interface SCThingThatCanBeOfferedWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Translations of a thing that can be offered
|
* Translations of a thing that can be offered
|
||||||
*/
|
*/
|
||||||
@@ -63,11 +65,16 @@ export interface SCThingThatCanBeOfferedWithoutReferences extends SCThing {
|
|||||||
* A thing that can be offered
|
* A thing that can be offered
|
||||||
*/
|
*/
|
||||||
export interface SCThingThatCanBeOffered<T extends SCPriceGroup>
|
export interface SCThingThatCanBeOffered<T extends SCPriceGroup>
|
||||||
extends SCThing {
|
extends SCThing, SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* List of offers for that thing
|
* List of offers for that thing
|
||||||
*/
|
*/
|
||||||
offers?: Array<SCThingThatCanBeOfferedOffer<T>>;
|
offers?: Array<SCThingThatCanBeOfferedOffer<T>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translations of a thing that can be offered
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCThingThatCanBeOfferedTranslatableProperties>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCMap} from '../types/Map';
|
import {SCMap} from '../types/Map';
|
||||||
|
|
||||||
@@ -22,9 +22,8 @@ import {SCMap} from '../types/Map';
|
|||||||
* !!! BEWARE !!!
|
* !!! BEWARE !!!
|
||||||
* `T` should be a union type - e.g. `T = 'foo' | 'bar' | 'foobar';`
|
* `T` should be a union type - e.g. `T = 'foo' | 'bar' | 'foobar';`
|
||||||
*/
|
*/
|
||||||
export interface SCThingWithCategoriesWithoutReferences<T,
|
export interface SCThingWithCategoriesWithoutReferences<T, U extends SCThingWithCategoriesSpecificValues>
|
||||||
U extends SCThingWithCategoriesSpecificValues>
|
extends SCThingWithoutReferences {
|
||||||
extends SCThing {
|
|
||||||
/**
|
/**
|
||||||
* Categories of a thing with categories
|
* Categories of a thing with categories
|
||||||
*/
|
*/
|
||||||
@@ -43,10 +42,22 @@ export interface SCThingWithCategoriesWithoutReferences<T,
|
|||||||
translations?: SCTranslations<SCThingWithCategoriesTranslatableProperties>;
|
translations?: SCTranslations<SCThingWithCategoriesTranslatableProperties>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A thing with categories
|
||||||
|
*/
|
||||||
|
export interface SCThingWithCategories<T, U extends SCThingWithCategoriesSpecificValues>
|
||||||
|
extends SCThing, SCThingWithCategoriesWithoutReferences<T, U> {
|
||||||
|
/**
|
||||||
|
* Translated fields of a thing with categories
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCThingWithCategoriesTranslatableProperties>;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translatable properties of a thing with categories
|
* Translatable properties of a thing with categories
|
||||||
*/
|
*/
|
||||||
export interface SCThingWithCategoriesTranslatableProperties extends SCThingTranslatableProperties {
|
export interface SCThingWithCategoriesTranslatableProperties
|
||||||
|
extends SCThingTranslatableProperties {
|
||||||
/**
|
/**
|
||||||
* translations of the categories of a thing with categories
|
* translations of the categories of a thing with categories
|
||||||
*/
|
*/
|
||||||
@@ -88,8 +99,8 @@ export interface SCThingWithCategoriesSpecificValues {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a thing without references that accepts payments
|
* Meta information about a thing without references that accepts payments
|
||||||
*/
|
*/
|
||||||
export class SCThingWithCategoriesWithoutReferencesMeta<T, U> implements
|
export class SCThingWithCategoriesWithoutReferencesMeta<T, U>
|
||||||
SCMetaTranslations<SCThingWithCategoriesWithoutReferences<T, U>> {
|
implements SCMetaTranslations<SCThingWithCategoriesWithoutReferences<T, U>> {
|
||||||
|
|
||||||
protected static _instance: SCThingMeta;
|
protected static _instance: SCThingMeta;
|
||||||
|
|
||||||
@@ -98,22 +109,22 @@ export class SCThingWithCategoriesWithoutReferencesMeta<T, U> implements
|
|||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 {SCThing, SCThingTranslatableProperties} from '../Thing';
|
|
||||||
import {SCTranslations} from '../types/i18n';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A thing that has translations
|
|
||||||
*/
|
|
||||||
export interface SCThingWithTranslations extends SCThing {
|
|
||||||
translations: SCTranslations<SCThingTranslatableProperties>;
|
|
||||||
}
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
import {SCEvent, SCEventMeta, SCEventWithoutReferences} from '../base/Event';
|
import {SCEvent, SCEventMeta, SCEventWithoutReferences} from '../base/Event';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -27,8 +28,7 @@ import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
|||||||
*/
|
*/
|
||||||
export interface SCAcademicEventWithoutReferences
|
export interface SCAcademicEventWithoutReferences
|
||||||
extends SCEventWithoutReferences,
|
extends SCEventWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCAcademicEventCategories,
|
SCThingWithCategoriesWithoutReferences<SCAcademicEventCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
SCThingWithCategoriesSpecificValues> {
|
|
||||||
/**
|
/**
|
||||||
* Majors of the academic event that this event belongs to
|
* Majors of the academic event that this event belongs to
|
||||||
*/
|
*/
|
||||||
@@ -55,7 +55,9 @@ export interface SCAcademicEventWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCAcademicEvent extends SCEvent, SCAcademicEventWithoutReferences {
|
export interface SCAcademicEvent
|
||||||
|
extends SCEvent, SCAcademicEventWithoutReferences,
|
||||||
|
SCThingWithCategories<SCAcademicEventCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Translated fields of an academic event
|
* Translated fields of an academic event
|
||||||
*/
|
*/
|
||||||
@@ -104,37 +106,39 @@ export interface SCAcademicEventTranslatableProperties
|
|||||||
/**
|
/**
|
||||||
* Meta information about academic events
|
* Meta information about academic events
|
||||||
*/
|
*/
|
||||||
export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslations<SCAcademicEvent> {
|
export class SCAcademicEventMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCAcademicEvent> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCEventMeta.getInstance().fieldTranslations.de,
|
...SCEventMeta.getInstance().fieldTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCEventMeta.getInstance().fieldTranslations.en,
|
...SCEventMeta.getInstance().fieldTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCEventMeta.getInstance().fieldValueTranslations.de,
|
...SCEventMeta.getInstance().fieldValueTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
type: 'akademische Veranstaltung',
|
type: 'akademische Veranstaltung',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCEventMeta.getInstance().fieldValueTranslations.en,
|
...SCEventMeta.getInstance().fieldValueTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCAcademicEventCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.AcademicEvent,
|
type: SCThingType.AcademicEvent,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import {
|
|||||||
SCCreativeWorkWithoutReferences,
|
SCCreativeWorkWithoutReferences,
|
||||||
} from '../base/CreativeWork';
|
} from '../base/CreativeWork';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -32,8 +33,7 @@ import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
|||||||
*/
|
*/
|
||||||
export interface SCArticleWithoutReferences
|
export interface SCArticleWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences,
|
extends SCCreativeWorkWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCArticleCategories,
|
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
SCThingWithCategoriesSpecificValues> {
|
|
||||||
/**
|
/**
|
||||||
* Article itself as markdown
|
* Article itself as markdown
|
||||||
*/
|
*/
|
||||||
@@ -55,7 +55,9 @@ export interface SCArticleWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCArticle extends SCCreativeWork, SCArticleWithoutReferences {
|
export interface SCArticle
|
||||||
|
extends SCCreativeWork, SCArticleWithoutReferences,
|
||||||
|
SCThingWithCategories<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Translated fields of an article
|
* Translated fields of an article
|
||||||
*/
|
*/
|
||||||
@@ -86,37 +88,38 @@ export interface SCArticleTranslatableProperties
|
|||||||
/**
|
/**
|
||||||
* Meta information about an article
|
* Meta information about an article
|
||||||
*/
|
*/
|
||||||
export class SCArticleMeta extends SCThingMeta implements SCMetaTranslations<SCArticle> {
|
export class SCArticleMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCArticle> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
type: 'Artikel',
|
type: 'Artikel',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.Article,
|
type: SCThingType.Article,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ import {SCPersonWithoutReferences} from './Person';
|
|||||||
/**
|
/**
|
||||||
* A book without references
|
* A book without references
|
||||||
*/
|
*/
|
||||||
export interface SCBookWithoutReferences extends SCCreativeWorkWithoutReferences {
|
export interface SCBookWithoutReferences
|
||||||
|
extends SCCreativeWorkWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Edition of a book
|
* Edition of a book
|
||||||
*/
|
*/
|
||||||
@@ -58,7 +59,8 @@ export interface SCBookWithoutReferences extends SCCreativeWorkWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCBook extends SCCreativeWork, SCBookWithoutReferences {
|
export interface SCBook
|
||||||
|
extends SCCreativeWork, SCBookWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Authors of the creative work
|
* Authors of the creative work
|
||||||
*/
|
*/
|
||||||
@@ -95,23 +97,23 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Buch',
|
type: 'Buch',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Book,
|
type: SCThingType.Book,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,11 +13,13 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
|
SCPlace,
|
||||||
SCPlaceWithoutReferences,
|
SCPlaceWithoutReferences,
|
||||||
SCPlaceWithoutReferencesMeta,
|
SCPlaceWithoutReferencesMeta,
|
||||||
SCPlaceWithoutReferencesTranslatableProperties,
|
SCPlaceWithoutReferencesTranslatableProperties,
|
||||||
} from '../base/Place';
|
} from '../base/Place';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -37,8 +39,7 @@ export type SCBuildingCategories =
|
|||||||
| 'restroom';
|
| 'restroom';
|
||||||
|
|
||||||
export interface SCBuildingWithoutReferences
|
export interface SCBuildingWithoutReferences
|
||||||
extends SCThingWithCategoriesWithoutReferences<SCBuildingCategories,
|
extends SCThingWithCategoriesWithoutReferences<SCBuildingCategories, SCThingWithCategoriesSpecificValues>,
|
||||||
SCThingWithCategoriesSpecificValues>,
|
|
||||||
SCPlaceWithoutReferences {
|
SCPlaceWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Categories of a building
|
* Categories of a building
|
||||||
@@ -66,7 +67,9 @@ export interface SCBuildingWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCBuilding extends SCBuildingWithoutReferences {
|
export interface SCBuilding
|
||||||
|
extends SCBuildingWithoutReferences, SCPlace,
|
||||||
|
SCThingWithCategories<SCBuildingCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Translated fields of a building
|
* Translated fields of a building
|
||||||
*/
|
*/
|
||||||
@@ -79,39 +82,41 @@ export interface SCBuilding extends SCBuildingWithoutReferences {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SCBuildingTranslatableProperties
|
export interface SCBuildingTranslatableProperties
|
||||||
extends SCPlaceWithoutReferencesTranslatableProperties, SCThingWithCategoriesTranslatableProperties {
|
extends SCPlaceWithoutReferencesTranslatableProperties, SCThingWithCategoriesTranslatableProperties {
|
||||||
floors?: string[];
|
floors?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about a place
|
* Meta information about a place
|
||||||
*/
|
*/
|
||||||
export class SCBuildingMeta extends SCThingMeta implements SCMetaTranslations<SCBuilding> {
|
export class SCBuildingMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCBuilding> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
||||||
floors: 'Etagen',
|
floors: 'Etagen',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
||||||
categories: {
|
categories: {
|
||||||
'cafe': 'Café',
|
'cafe': 'Café',
|
||||||
'canteen': 'Kantine',
|
'canteen': 'Kantine',
|
||||||
@@ -125,9 +130,9 @@ export class SCBuildingMeta extends SCThingMeta implements SCMetaTranslations<SC
|
|||||||
type: 'Gebäude',
|
type: 'Gebäude',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBuildingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Building,
|
type: SCThingType.Building,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,19 +14,20 @@
|
|||||||
*/
|
*/
|
||||||
import {SCAcademicTermWithoutReferences} from '../base/AcademicTerm';
|
import {SCAcademicTermWithoutReferences} from '../base/AcademicTerm';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferencesMeta,
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
} from '../base/ThingWithCategories';
|
} from '../base/ThingWithCategories';
|
||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A catalog without references
|
* A catalog without references
|
||||||
*/
|
*/
|
||||||
export interface SCCatalogWithoutReferences
|
export interface SCCatalogWithoutReferences
|
||||||
extends SCThingWithCategoriesWithoutReferences<SCCatalogCategories,
|
extends SCThingWithCategoriesWithoutReferences<SCCatalogCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
SCThingWithCategoriesSpecificValues> {
|
|
||||||
/**
|
/**
|
||||||
* Level of the catalog (0 for 'root catalog', 1 for its subcatalog, 2 for its subcatalog etc.)
|
* Level of the catalog (0 for 'root catalog', 1 for its subcatalog, 2 for its subcatalog etc.)
|
||||||
*
|
*
|
||||||
@@ -45,7 +46,9 @@ export interface SCCatalogWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCCatalog extends SCCatalogWithoutReferences {
|
export interface SCCatalog
|
||||||
|
extends SCCatalogWithoutReferences, SCThing,
|
||||||
|
SCThingWithCategories<SCCatalogCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Academic term that a catalog belongs to (e.g. semester)
|
* Academic term that a catalog belongs to (e.g. semester)
|
||||||
*/
|
*/
|
||||||
@@ -61,42 +64,48 @@ export interface SCCatalog extends SCCatalogWithoutReferences {
|
|||||||
*/
|
*/
|
||||||
superCatalogs?: SCCatalogWithoutReferences[];
|
superCatalogs?: SCCatalogWithoutReferences[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of a catalog
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCThingWithCategoriesTranslatableProperties>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of a catalog
|
* Type of a catalog
|
||||||
*/
|
*/
|
||||||
type: SCThingType.Catalog;
|
type: SCThingType.Catalog;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Catalog meta data
|
* Catalog meta data
|
||||||
*/
|
*/
|
||||||
export class SCCatalogMeta extends SCThingMeta implements SCMetaTranslations<SCCatalog> {
|
export class SCCatalogMeta
|
||||||
|
extends SCThingMeta implements SCMetaTranslations<SCCatalog> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
type: 'Verzeichnis',
|
type: 'Verzeichnis',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCCatalogCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.Catalog,
|
type: SCThingType.Catalog,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCAcademicDegree, SCAcademicDegreeMeta} from '../base/AcademicDegree';
|
import {SCAcademicDegree, SCAcademicDegreeMeta, SCAcademicDegreeWithoutReferences} from '../base/AcademicDegree';
|
||||||
import {
|
import {
|
||||||
SCAcademicPriceGroup,
|
SCAcademicPriceGroup,
|
||||||
SCThingThatCanBeOffered,
|
SCThingThatCanBeOffered,
|
||||||
@@ -22,13 +22,13 @@ import {
|
|||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingType} from '../Thing';
|
||||||
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCDateSeriesWithoutReferences} from './DateSeries';
|
import {SCDateSeriesWithoutReferences} from './DateSeries';
|
||||||
import {SCOrganization} from './Organization';
|
import {SCOrganizationWithoutReferences} from './Organization';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A course of studies without references
|
* A course of studies without references
|
||||||
*/
|
*/
|
||||||
export interface SCCourseOfStudiesWithoutReferences extends SCAcademicDegree,
|
export interface SCCourseOfStudiesWithoutReferences
|
||||||
SCThingThatCanBeOfferedWithoutReferences {
|
extends SCAcademicDegreeWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The main language in which the course of studies
|
* The main language in which the course of studies
|
||||||
* is beeing offered
|
* is beeing offered
|
||||||
@@ -66,18 +66,18 @@ export interface SCCourseOfStudiesWithoutReferences extends SCAcademicDegree,
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences,
|
export interface SCCourseOfStudies
|
||||||
SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
extends SCCourseOfStudiesWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup>, SCAcademicDegree {
|
||||||
/**
|
/**
|
||||||
* The department that manages the course of studies
|
* The department that manages the course of studies
|
||||||
*/
|
*/
|
||||||
department: SCOrganization;
|
department: SCOrganizationWithoutReferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The secretary that administers requests and
|
* The secretary that administers requests and
|
||||||
* questions concerning the course of studies
|
* questions concerning the course of studies
|
||||||
*/
|
*/
|
||||||
secretary: SCOrganization;
|
secretary: SCOrganizationWithoutReferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dates at which the course of studies is planned to start
|
* Dates at which the course of studies is planned to start
|
||||||
@@ -85,7 +85,7 @@ export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences,
|
|||||||
startDates?: SCDateSeriesWithoutReferences[];
|
startDates?: SCDateSeriesWithoutReferences[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of a dish
|
* Translated fields of a course of studies
|
||||||
*/
|
*/
|
||||||
translations?: SCTranslations<SCCourseOfStudiesTranslatableProperties>;
|
translations?: SCTranslations<SCCourseOfStudiesTranslatableProperties>;
|
||||||
|
|
||||||
@@ -95,14 +95,20 @@ export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences,
|
|||||||
type: SCThingType.CourseOfStudies;
|
type: SCThingType.CourseOfStudies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable properties of a course of studies
|
||||||
|
*/
|
||||||
export interface SCCourseOfStudiesTranslatableProperties
|
export interface SCCourseOfStudiesTranslatableProperties
|
||||||
extends SCThingThatCanBeOfferedTranslatableProperties {
|
extends SCThingThatCanBeOfferedTranslatableProperties {
|
||||||
|
// noop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about a course of studies
|
* Meta information about a course of studies
|
||||||
*/
|
*/
|
||||||
export class SCCourseOfStudiesMeta extends SCThingMeta implements SCMetaTranslations<SCCourseOfStudies> {
|
export class SCCourseOfStudiesMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCCourseOfStudies> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ import {SCSportCourseWithoutReferences} from './SportCourse';
|
|||||||
/**
|
/**
|
||||||
* Price groups for sport courses
|
* Price groups for sport courses
|
||||||
*/
|
*/
|
||||||
export interface SCSportCoursePriceGroup extends SCAcademicPriceGroup {
|
export interface SCSportCoursePriceGroup
|
||||||
|
extends SCAcademicPriceGroup {
|
||||||
/**
|
/**
|
||||||
* Price for alumnis
|
* Price for alumnis
|
||||||
*/
|
*/
|
||||||
@@ -39,7 +40,8 @@ export interface SCSportCoursePriceGroup extends SCAcademicPriceGroup {
|
|||||||
/**
|
/**
|
||||||
* A date without references
|
* A date without references
|
||||||
*/
|
*/
|
||||||
export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWithoutReferences {
|
export interface SCDateSeriesWithoutReferences
|
||||||
|
extends SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Dates of the date series that are initially planned to be held
|
* Dates of the date series that are initially planned to be held
|
||||||
*/
|
*/
|
||||||
@@ -76,9 +78,10 @@ export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWi
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCDateSeries extends SCDateSeriesWithoutReferences,
|
export interface SCDateSeries
|
||||||
SCThingInPlace,
|
extends SCDateSeriesWithoutReferences,
|
||||||
SCThingThatCanBeOffered<SCSportCoursePriceGroup> {
|
SCThingInPlace,
|
||||||
|
SCThingThatCanBeOffered<SCSportCoursePriceGroup> {
|
||||||
/**
|
/**
|
||||||
* Event to which the date series belongs
|
* Event to which the date series belongs
|
||||||
*/
|
*/
|
||||||
@@ -104,7 +107,9 @@ export interface SCDateSeries extends SCDateSeriesWithoutReferences,
|
|||||||
/**
|
/**
|
||||||
* Meta information about a date series
|
* Meta information about a date series
|
||||||
*/
|
*/
|
||||||
export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<SCDateSeries> {
|
export class SCDateSeriesMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCDateSeries> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,14 +14,15 @@
|
|||||||
*/
|
*/
|
||||||
import * as jsonpatch from 'json-patch';
|
import * as jsonpatch from 'json-patch';
|
||||||
import {SCThingsWithoutDiff} from '../Classes';
|
import {SCThingsWithoutDiff} from '../Classes';
|
||||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
import {SCISO8601Date} from '../types/Time';
|
import {SCISO8601Date} from '../types/Time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A diff without references
|
* A diff without references
|
||||||
*/
|
*/
|
||||||
export interface SCDiffWithoutReferences extends SCThing {
|
export interface SCDiffWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Action of the diff
|
* Action of the diff
|
||||||
*/
|
*/
|
||||||
@@ -48,7 +49,8 @@ export interface SCDiffWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCDiff extends SCDiffWithoutReferences {
|
export interface SCDiff
|
||||||
|
extends SCDiffWithoutReferences, SCThing {
|
||||||
/**
|
/**
|
||||||
* Original object the diff was generated on
|
* Original object the diff was generated on
|
||||||
*/
|
*/
|
||||||
@@ -63,32 +65,34 @@ export interface SCDiff extends SCDiffWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a diff
|
* Meta information about a diff
|
||||||
*/
|
*/
|
||||||
export class SCDiffMeta extends SCThingMeta implements SCMetaTranslations<SCDiff> {
|
export class SCDiffMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCDiff> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
action: 'Aktion',
|
action: 'Aktion',
|
||||||
changes: 'Änderungen',
|
changes: 'Änderungen',
|
||||||
dateCreated: 'Erstellungsdatum',
|
dateCreated: 'Erstellungsdatum',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Unterschied',
|
type: 'Unterschied',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Diff,
|
type: SCThingType.Diff,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import {
|
|||||||
SCThingThatCanBeOfferedWithoutReferences,
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
} from '../base/ThingThatCanBeOffered';
|
} from '../base/ThingThatCanBeOffered';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -30,8 +31,9 @@ import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
|||||||
/**
|
/**
|
||||||
* A dish without references
|
* A dish without references
|
||||||
*/
|
*/
|
||||||
export interface SCDishWithoutReferences extends SCThingThatCanBeOfferedWithoutReferences,
|
export interface SCDishWithoutReferences
|
||||||
SCThingWithCategoriesWithoutReferences<SCDishCategories, SCThingWithCategoriesSpecificValues> {
|
extends SCThingThatCanBeOfferedWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferences<SCDishCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Additives of the dish
|
* Additives of the dish
|
||||||
*/
|
*/
|
||||||
@@ -68,8 +70,9 @@ export interface SCDishWithoutReferences extends SCThingThatCanBeOfferedWithoutR
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCDish extends SCDishWithoutReferences,
|
export interface SCDish
|
||||||
SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
extends SCDishWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||||
|
SCThingWithCategories<SCDishCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Dishes ("Beilagen") that are served with the dish (if only certain supplement dishes can be taken with a dish)
|
* Dishes ("Beilagen") that are served with the dish (if only certain supplement dishes can be taken with a dish)
|
||||||
*/
|
*/
|
||||||
@@ -165,7 +168,9 @@ export interface SCNutritionInformation {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a dish
|
* Meta information about a dish
|
||||||
*/
|
*/
|
||||||
export class SCDishMeta extends SCThingMeta implements SCMetaTranslations<SCDish> {
|
export class SCDishMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCDish> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,8 +40,9 @@ export type SCFavoriteDataTypes = SCAcademicEventWithoutReferences
|
|||||||
/**
|
/**
|
||||||
* A favorite without references
|
* A favorite without references
|
||||||
*/
|
*/
|
||||||
export interface SCFavoriteWithoutReferences extends SCSaveableThingWithoutReferences {
|
export interface SCFavoriteWithoutReferences
|
||||||
|
extends SCSaveableThingWithoutReferences {
|
||||||
|
// noop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +50,8 @@ export interface SCFavoriteWithoutReferences extends SCSaveableThingWithoutRefer
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCFavorite extends SCSaveableThing<SCFavoriteDataTypes> {
|
export interface SCFavorite
|
||||||
|
extends SCSaveableThing<SCFavoriteDataTypes>, SCFavoriteWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Type of a favorite
|
* Type of a favorite
|
||||||
*/
|
*/
|
||||||
@@ -59,5 +61,6 @@ export interface SCFavorite extends SCSaveableThing<SCFavoriteDataTypes> {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a favorite
|
* Meta information about a favorite
|
||||||
*/
|
*/
|
||||||
export class SCFavoriteMeta extends SCThingMeta {
|
export class SCFavoriteMeta
|
||||||
|
extends SCThingMeta {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
import {Feature, FeatureCollection, GeometryObject, LineString} from 'geojson';
|
import {Feature, FeatureCollection, GeometryObject, LineString} from 'geojson';
|
||||||
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
||||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingTranslatableProperties, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCPointOfInterestWithoutReferences} from './PointOfInterest';
|
import {SCPointOfInterestWithoutReferences} from './PointOfInterest';
|
||||||
import {SCRoomWithoutReferences} from './Room';
|
import {SCRoomWithoutReferences} from './Room';
|
||||||
@@ -22,7 +22,8 @@ import {SCRoomWithoutReferences} from './Room';
|
|||||||
/**
|
/**
|
||||||
* A floor without references
|
* A floor without references
|
||||||
*/
|
*/
|
||||||
export interface SCFloorWithoutReferences extends SCThing {
|
export interface SCFloorWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Floor name in the place it is in e.g. "first floor", "ground floor". This doesn't reference the building name.
|
* Floor name in the place it is in e.g. "first floor", "ground floor". This doesn't reference the building name.
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +50,8 @@ export interface SCFloorWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCFloor extends SCFloorWithoutReferences, SCThingInPlace {
|
export interface SCFloor
|
||||||
|
extends SCFloorWithoutReferences, SCThingInPlace {
|
||||||
/**
|
/**
|
||||||
* Translated fields of a floor
|
* Translated fields of a floor
|
||||||
*/
|
*/
|
||||||
@@ -86,7 +88,8 @@ export interface SCFloorFeatureWithPlace<T extends GeometryObject, P = any>
|
|||||||
/**
|
/**
|
||||||
* Translatable properties of a floor
|
* Translatable properties of a floor
|
||||||
*/
|
*/
|
||||||
export interface SCFloorTranslatableProperties extends SCThingTranslatableProperties {
|
export interface SCFloorTranslatableProperties
|
||||||
|
extends SCThingTranslatableProperties {
|
||||||
/**
|
/**
|
||||||
* Translation of the floor name
|
* Translation of the floor name
|
||||||
*/
|
*/
|
||||||
@@ -96,29 +99,31 @@ export interface SCFloorTranslatableProperties extends SCThingTranslatableProper
|
|||||||
/**
|
/**
|
||||||
* Meta information about floors
|
* Meta information about floors
|
||||||
*/
|
*/
|
||||||
export class SCFloorMeta extends SCThingMeta implements SCMetaTranslations<SCFloor> {
|
export class SCFloorMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCFloor> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Etage',
|
type: 'Etage',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Floor,
|
type: SCThingType.Floor,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ import {SCISO8601Date} from '../types/Time';
|
|||||||
/**
|
/**
|
||||||
* A message without references
|
* A message without references
|
||||||
*/
|
*/
|
||||||
export interface SCMessageWithoutReferences extends SCCreativeWorkWithoutReferences {
|
export interface SCMessageWithoutReferences
|
||||||
|
extends SCCreativeWorkWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Audience of the message
|
* Audience of the message
|
||||||
*/
|
*/
|
||||||
@@ -58,7 +59,8 @@ export interface SCMessageWithoutReferences extends SCCreativeWorkWithoutReferen
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCMessage extends SCCreativeWork, SCMessageWithoutReferences {
|
export interface SCMessage
|
||||||
|
extends SCCreativeWork, SCMessageWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Translated fields of a message
|
* Translated fields of a message
|
||||||
*/
|
*/
|
||||||
@@ -92,29 +94,31 @@ export interface SCMessageTranslatableProperties
|
|||||||
/**
|
/**
|
||||||
* Meta information about messages
|
* Meta information about messages
|
||||||
*/
|
*/
|
||||||
export class SCMessageMeta extends SCThingMeta implements SCMetaTranslations<SCMessage> {
|
export class SCMessageMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCMessage> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Nachricht',
|
type: 'Nachricht',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Message,
|
type: SCThingType.Message,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThingInPlace} from '../base/ThingInPlace';
|
import {SCThingInPlace} from '../base/ThingInPlace';
|
||||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An organization without references
|
* An organization without references
|
||||||
*/
|
*/
|
||||||
export interface SCOrganizationWithoutReferences extends SCThing {
|
export interface SCOrganizationWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Type of an organization
|
* Type of an organization
|
||||||
*/
|
*/
|
||||||
@@ -30,7 +31,8 @@ export interface SCOrganizationWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCOrganization extends SCOrganizationWithoutReferences, SCThingInPlace {
|
export interface SCOrganization
|
||||||
|
extends SCOrganizationWithoutReferences, SCThingInPlace {
|
||||||
/**
|
/**
|
||||||
* Type of an organization
|
* Type of an organization
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations, SCNationality} from '../types/i18n';
|
import {SCMetaTranslations, SCNationality} from '../types/i18n';
|
||||||
import {SCISO8601Date} from '../types/Time';
|
import {SCISO8601Date} from '../types/Time';
|
||||||
import {SCBuildingWithoutReferences} from './Building';
|
import {SCBuildingWithoutReferences} from './Building';
|
||||||
@@ -23,7 +23,8 @@ import {SCRoomWithoutReferences} from './Room';
|
|||||||
/**
|
/**
|
||||||
* A person without references
|
* A person without references
|
||||||
*/
|
*/
|
||||||
export interface SCPersonWithoutReferences extends SCThing {
|
export interface SCPersonWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Additional first names of the person.
|
* Additional first names of the person.
|
||||||
*/
|
*/
|
||||||
@@ -102,7 +103,8 @@ export interface SCPersonWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCPerson extends SCPersonWithoutReferences {
|
export interface SCPerson
|
||||||
|
extends SCPersonWithoutReferences, SCThing {
|
||||||
/**
|
/**
|
||||||
* Organization the person works for
|
* Organization the person works for
|
||||||
*/
|
*/
|
||||||
@@ -129,29 +131,31 @@ export interface SCPerson extends SCPersonWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a person
|
* Meta information about a person
|
||||||
*/
|
*/
|
||||||
export class SCPersonMeta extends SCThingMeta implements SCMetaTranslations<SCPerson> {
|
export class SCPersonMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCPerson> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Person',
|
type: 'Person',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Person,
|
type: SCThingType.Person,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,9 +12,10 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCPlaceWithoutReferences, SCPlaceWithoutReferencesMeta} from '../base/Place';
|
import {SCPlace, SCPlaceWithoutReferences, SCPlaceWithoutReferencesMeta} from '../base/Place';
|
||||||
import {SCThingInPlace} from '../base/ThingInPlace';
|
import {SCThingInPlace} from '../base/ThingInPlace';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -27,8 +28,7 @@ import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
|||||||
* A point of interest without references
|
* A point of interest without references
|
||||||
*/
|
*/
|
||||||
export interface SCPointOfInterestWithoutReferences
|
export interface SCPointOfInterestWithoutReferences
|
||||||
extends SCThingWithCategoriesWithoutReferences<SCPointOfInterestCategories,
|
extends SCThingWithCategoriesWithoutReferences<SCPointOfInterestCategories, SCThingWithCategoriesSpecificValues>,
|
||||||
SCThingWithCategoriesSpecificValues>,
|
|
||||||
SCPlaceWithoutReferences {
|
SCPlaceWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Translated properties of a point of interest
|
* Translated properties of a point of interest
|
||||||
@@ -46,7 +46,9 @@ export interface SCPointOfInterestWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCPointOfInterest extends SCPointOfInterestWithoutReferences, SCThingInPlace {
|
export interface SCPointOfInterest
|
||||||
|
extends SCPointOfInterestWithoutReferences, SCThingInPlace, SCPlace,
|
||||||
|
SCThingWithCategories<SCPointOfInterestCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Translated properties of a point of interest
|
* Translated properties of a point of interest
|
||||||
*/
|
*/
|
||||||
@@ -71,39 +73,41 @@ export type SCPointOfInterestCategories =
|
|||||||
/**
|
/**
|
||||||
* Meta information about points of interest
|
* Meta information about points of interest
|
||||||
*/
|
*/
|
||||||
export class SCPointOfInterestMeta extends SCThingMeta implements SCMetaTranslations<SCPointOfInterest> {
|
export class SCPointOfInterestMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCPointOfInterest> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Sonderziel',
|
type: 'Sonderziel',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPointOfInterestCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.PointOfInterest,
|
type: SCThingType.PointOfInterest,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,13 +12,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCPlaceWithoutReferences, SCPlaceWithoutReferencesMeta} from '../base/Place';
|
import {SCPlace, SCPlaceWithoutReferences, SCPlaceWithoutReferencesMeta} from '../base/Place';
|
||||||
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
||||||
import {
|
import {
|
||||||
|
SCThingThatAcceptsPayments,
|
||||||
SCThingThatAcceptsPaymentsWithoutReferences,
|
SCThingThatAcceptsPaymentsWithoutReferences,
|
||||||
SCThingThatAcceptsPaymentsWithoutReferencesMeta,
|
SCThingThatAcceptsPaymentsWithoutReferencesMeta,
|
||||||
} from '../base/ThingThatAcceptsPayments';
|
} from '../base/ThingThatAcceptsPayments';
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
@@ -81,7 +83,9 @@ export interface SCRoomWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCRoom extends SCRoomWithoutReferences, SCThingInPlace {
|
export interface SCRoom
|
||||||
|
extends SCRoomWithoutReferences, SCThingInPlace, SCThingThatAcceptsPayments, SCPlace,
|
||||||
|
SCThingWithCategories<SCRoomCategories, SCRoomSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Translations of specific values of the object
|
* Translations of specific values of the object
|
||||||
*
|
*
|
||||||
@@ -98,7 +102,8 @@ export interface SCRoom extends SCRoomWithoutReferences, SCThingInPlace {
|
|||||||
/**
|
/**
|
||||||
* Category specific values of a room
|
* Category specific values of a room
|
||||||
*/
|
*/
|
||||||
export interface SCRoomSpecificValues extends SCThingWithCategoriesSpecificValues {
|
export interface SCRoomSpecificValues
|
||||||
|
extends SCThingWithCategoriesSpecificValues {
|
||||||
/**
|
/**
|
||||||
* Category specific opening hours of the room
|
* Category specific opening hours of the room
|
||||||
*/
|
*/
|
||||||
@@ -108,37 +113,39 @@ export interface SCRoomSpecificValues extends SCThingWithCategoriesSpecificValue
|
|||||||
/**
|
/**
|
||||||
* Meta information about a place
|
* Meta information about a place
|
||||||
*/
|
*/
|
||||||
export class SCRoomMeta extends SCThingMeta implements SCMetaTranslations<SCRoom> {
|
export class SCRoomMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCRoom> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
||||||
... SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
...SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
||||||
SCRoomSpecificValues>().fieldTranslations.de,
|
SCRoomSpecificValues>().fieldTranslations.de,
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
||||||
... SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
...SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
||||||
SCRoomSpecificValues>().fieldTranslations.en,
|
SCRoomSpecificValues>().fieldTranslations.en,
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
||||||
... SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
...SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
||||||
SCRoomSpecificValues>().fieldValueTranslations.de,
|
SCRoomSpecificValues>().fieldValueTranslations.de,
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
||||||
categories: {
|
categories: {
|
||||||
'cafe': 'Café',
|
'cafe': 'Café',
|
||||||
'canteen': 'Kantine',
|
'canteen': 'Kantine',
|
||||||
@@ -157,11 +164,11 @@ export class SCRoomMeta extends SCThingMeta implements SCMetaTranslations<SCRoom
|
|||||||
type: 'Raum',
|
type: 'Raum',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
...SCPlaceWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
||||||
... SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
...SCThingThatAcceptsPaymentsWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCRoomCategories,
|
||||||
SCRoomSpecificValues>().fieldValueTranslations.en,
|
SCRoomSpecificValues>().fieldValueTranslations.en,
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Room,
|
type: SCThingType.Room,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,14 +12,19 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCAcademicTermWithoutReferences, SCAcademicTermWithoutReferencesMeta} from '../base/AcademicTerm';
|
import {
|
||||||
|
SCAcademicTerm,
|
||||||
|
SCAcademicTermWithoutReferences,
|
||||||
|
SCAcademicTermWithoutReferencesMeta,
|
||||||
|
} from '../base/AcademicTerm';
|
||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingType} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A semester without references
|
* A semester without references
|
||||||
*/
|
*/
|
||||||
export interface SCSemesterWithoutReferences extends SCAcademicTermWithoutReferences {
|
export interface SCSemesterWithoutReferences
|
||||||
|
extends SCAcademicTermWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The short name of the semester, using the given pattern.
|
* The short name of the semester, using the given pattern.
|
||||||
*
|
*
|
||||||
@@ -38,7 +43,8 @@ export interface SCSemesterWithoutReferences extends SCAcademicTermWithoutRefere
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCSemester extends SCSemesterWithoutReferences {
|
export interface SCSemester
|
||||||
|
extends SCSemesterWithoutReferences, SCAcademicTerm {
|
||||||
/**
|
/**
|
||||||
* Type of the semester
|
* Type of the semester
|
||||||
*/
|
*/
|
||||||
@@ -48,13 +54,15 @@ export interface SCSemester extends SCSemesterWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a semester
|
* Meta information about a semester
|
||||||
*/
|
*/
|
||||||
export class SCSemesterMeta extends SCThingMeta implements SCMetaTranslations<SCSemester> {
|
export class SCSemesterMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCSemester> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCAcademicTermWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
...SCAcademicTermWithoutReferencesMeta.getInstance().fieldTranslations.de,
|
||||||
acronym: 'Abkürzung',
|
acronym: 'Abkürzung',
|
||||||
endDate: 'Ende',
|
endDate: 'Ende',
|
||||||
eventsEndDate: 'Vorlesungsschluss',
|
eventsEndDate: 'Vorlesungsschluss',
|
||||||
@@ -62,20 +70,20 @@ export class SCSemesterMeta extends SCThingMeta implements SCMetaTranslations<SC
|
|||||||
startDate: 'Beginn',
|
startDate: 'Beginn',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCAcademicTermWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
...SCAcademicTermWithoutReferencesMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCAcademicTermWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
...SCAcademicTermWithoutReferencesMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Semester',
|
type: 'Semester',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCAcademicTermWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
...SCAcademicTermWithoutReferencesMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Semester,
|
type: SCThingType.Semester,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferencesMeta,
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
} from '../base/ThingWithCategories';
|
} from '../base/ThingWithCategories';
|
||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
||||||
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
|
|
||||||
export type SCSettingCategories = string;
|
export type SCSettingCategories = string;
|
||||||
@@ -74,7 +75,13 @@ export enum SCSettingInputType {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCSetting extends SCSettingWithoutReferences {
|
export interface SCSetting
|
||||||
|
extends SCSettingWithoutReferences, SCThing,
|
||||||
|
SCThingWithCategories<SCSettingCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
|
/**
|
||||||
|
* Translated fields of a setting
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCSettingValueTranslatableProperties>;
|
||||||
/**
|
/**
|
||||||
* The type of this model
|
* The type of this model
|
||||||
*/
|
*/
|
||||||
@@ -111,8 +118,8 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
|||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
defaultValue: 'Standard Wert',
|
defaultValue: 'Standard Wert',
|
||||||
inputType: 'Eingabetyp',
|
inputType: 'Eingabetyp',
|
||||||
value: 'Wert',
|
value: 'Wert',
|
||||||
@@ -120,8 +127,8 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
|||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
defaultValue: 'default value',
|
defaultValue: 'default value',
|
||||||
inputType: 'input type',
|
inputType: 'input type',
|
||||||
},
|
},
|
||||||
@@ -130,24 +137,24 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
|||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
inputType: {
|
inputType: {
|
||||||
'multiple choice': 'mehrfach Auswahl',
|
'multiple choice': 'mehrfach Auswahl',
|
||||||
number: 'Zahl',
|
number: 'Zahl',
|
||||||
password: 'Passwort',
|
password: 'Passwort',
|
||||||
'single choice': 'einfache Auswahl',
|
'single choice': 'einfache Auswahl',
|
||||||
text: 'Text',
|
text: 'Text',
|
||||||
},
|
},
|
||||||
type: 'Einstellung',
|
type: 'Einstellung',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCSettingCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.Setting,
|
type: SCThingType.Setting,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import {SCMetaTranslations} from '../types/i18n';
|
|||||||
/**
|
/**
|
||||||
* A sport course without references
|
* A sport course without references
|
||||||
*/
|
*/
|
||||||
export interface SCSportCourseWithoutReferences extends SCEventWithoutReferences {
|
export interface SCSportCourseWithoutReferences
|
||||||
|
extends SCEventWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Type of a sport course
|
* Type of a sport course
|
||||||
*/
|
*/
|
||||||
@@ -31,7 +32,8 @@ export interface SCSportCourseWithoutReferences extends SCEventWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCSportCourse extends SCEvent, SCSportCourseWithoutReferences {
|
export interface SCSportCourse
|
||||||
|
extends SCEvent, SCSportCourseWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Type of a sport course
|
* Type of a sport course
|
||||||
*/
|
*/
|
||||||
@@ -41,33 +43,35 @@ export interface SCSportCourse extends SCEvent, SCSportCourseWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a sport course
|
* Meta information about a sport course
|
||||||
*/
|
*/
|
||||||
export class SCSportCourseMeta extends SCThingMeta implements SCMetaTranslations<SCSportCourse> {
|
export class SCSportCourseMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCSportCourse> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
... SCEventMeta.getInstance().fieldTranslations.de,
|
...SCEventMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
... SCEventMeta.getInstance().fieldTranslations.en,
|
...SCEventMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
... SCEventMeta.getInstance().fieldValueTranslations.de,
|
...SCEventMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Sportkurs',
|
type: 'Sportkurs',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
... SCEventMeta.getInstance().fieldValueTranslations.en,
|
...SCEventMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.SportCourse,
|
type: SCThingType.SportCourse,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,9 +12,12 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCAcademicPriceGroup,
|
import {
|
||||||
SCThingThatCanBeOffered,
|
SCAcademicPriceGroup,
|
||||||
SCThingThatCanBeOfferedTranslatableProperties} from '../base/ThingThatCanBeOffered';
|
SCThingThatCanBeOffered,
|
||||||
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
|
} from '../base/ThingThatCanBeOffered';
|
||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingType} from '../Thing';
|
||||||
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCMap} from '../types/Map';
|
import {SCMap} from '../types/Map';
|
||||||
@@ -25,8 +28,8 @@ import {SCPersonWithoutReferences} from './Person';
|
|||||||
/**
|
/**
|
||||||
* A study module without references
|
* A study module without references
|
||||||
*/
|
*/
|
||||||
export interface SCStudyModuleWithoutReferences extends
|
export interface SCStudyModuleWithoutReferences
|
||||||
SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
extends SCThingThatCanBeOfferedWithoutReferences {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ECTS points (European Credit Transfer System)
|
* ECTS points (European Credit Transfer System)
|
||||||
@@ -61,10 +64,11 @@ export interface SCStudyModuleWithoutReferences extends
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A study module
|
* A study module
|
||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCStudyModule extends SCStudyModuleWithoutReferences {
|
export interface SCStudyModule
|
||||||
|
extends SCStudyModuleWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
||||||
/**
|
/**
|
||||||
* Academic events that make up a study module
|
* Academic events that make up a study module
|
||||||
*/
|
*/
|
||||||
@@ -86,14 +90,24 @@ export interface SCStudyModule extends SCStudyModuleWithoutReferences {
|
|||||||
requiredModules?: SCStudyModuleWithoutReferences[];
|
requiredModules?: SCStudyModuleWithoutReferences[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The secretary that administers requests and
|
* The secretary that administers requests and
|
||||||
* questions concerning the study module by eg. students
|
* questions concerning the study module by eg. students
|
||||||
*/
|
*/
|
||||||
secretary: SCOrganizationWithoutReferences | SCPersonWithoutReferences;
|
secretary: SCOrganizationWithoutReferences | SCPersonWithoutReferences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of a study module
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCStudyModuleTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of the study module
|
||||||
|
*/
|
||||||
|
type: SCThingType.StudyModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SCStudyModuleTranslatableProperties
|
export interface SCStudyModuleTranslatableProperties
|
||||||
extends SCThingThatCanBeOfferedTranslatableProperties {
|
extends SCThingThatCanBeOfferedTranslatableProperties {
|
||||||
/**
|
/**
|
||||||
* Translations of the majors that this study module is meant for
|
* Translations of the majors that this study module is meant for
|
||||||
*/
|
*/
|
||||||
@@ -105,8 +119,8 @@ export interface SCStudyModuleTranslatableProperties
|
|||||||
necessity: SCMap<SCStudyModuleNecessity>;
|
necessity: SCMap<SCStudyModuleNecessity>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a modules necessity (in a major) as it may be required, optional or
|
* Represents a modules necessity (in a major) as it may be required, optional or
|
||||||
* is in a pool of n optional modules were m out of them have to be taken/completed.
|
* is in a pool of n optional modules were m out of them have to be taken/completed.
|
||||||
* Hence the elective option.
|
* Hence the elective option.
|
||||||
*/
|
*/
|
||||||
@@ -119,13 +133,15 @@ export enum SCStudyModuleNecessity {
|
|||||||
/**
|
/**
|
||||||
* Study module meta data
|
* Study module meta data
|
||||||
*/
|
*/
|
||||||
export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations<SCStudyModule> {
|
export class SCStudyModuleMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCStudyModule> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||||
academicEvents: 'Veranstaltungen',
|
academicEvents: 'Veranstaltungen',
|
||||||
ects: 'ECTS-Punkte',
|
ects: 'ECTS-Punkte',
|
||||||
faculty: 'Fachbereich',
|
faculty: 'Fachbereich',
|
||||||
@@ -137,7 +153,7 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
|
|||||||
secretary: 'Sekretariat',
|
secretary: 'Sekretariat',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||||
academicEvents: 'academic events',
|
academicEvents: 'academic events',
|
||||||
ects: 'ECTS points',
|
ects: 'ECTS points',
|
||||||
faculty: 'faculty',
|
faculty: 'faculty',
|
||||||
@@ -153,18 +169,18 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
|
|||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||||
necessity: {
|
necessity: {
|
||||||
'elective' : 'Wahlfach',
|
'elective': 'Wahlfach',
|
||||||
'optional' : 'optional',
|
'optional': 'optional',
|
||||||
'required' : 'benötigt',
|
'required': 'benötigt',
|
||||||
},
|
},
|
||||||
type: 'Studiengangmodul',
|
type: 'Studiengangmodul',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.StudyModule,
|
type: SCThingType.StudyModule,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,14 +13,15 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
||||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
import {SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
import {SCISO8601Duration} from '../types/Time';
|
import {SCISO8601Duration} from '../types/Time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ticket without references
|
* A ticket without references
|
||||||
*/
|
*/
|
||||||
export interface SCTicketWithoutReferences extends SCThing {
|
export interface SCTicketWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Approximate wait time
|
* Approximate wait time
|
||||||
*/
|
*/
|
||||||
@@ -47,7 +48,8 @@ export interface SCTicketWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace {
|
export interface SCTicket
|
||||||
|
extends SCTicketWithoutReferences, SCThingInPlace {
|
||||||
/**
|
/**
|
||||||
* Type of a ticket
|
* Type of a ticket
|
||||||
*/
|
*/
|
||||||
@@ -57,29 +59,31 @@ export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a ticket
|
* Meta information about a ticket
|
||||||
*/
|
*/
|
||||||
export class SCTicketMeta extends SCThingMeta implements SCMetaTranslations<SCTicket> {
|
export class SCTicketMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCTicket> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Ticket',
|
type: 'Ticket',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Ticket,
|
type: SCThingType.Ticket,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,11 +13,14 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
|
SCThingWithCategories,
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferencesMeta} from '../base/ThingWithCategories';
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
import {SCThingMeta, SCThingType} from '../Thing';
|
} from '../base/ThingWithCategories';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
||||||
|
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||||
import {SCISO8601Date} from '../types/Time';
|
import {SCISO8601Date} from '../types/Time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,7 +54,17 @@ export interface SCToDoWithoutReferences
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCToDo extends SCToDoWithoutReferences {
|
export interface SCToDo
|
||||||
|
extends SCToDoWithoutReferences, SCThing, SCThingWithCategories<string, SCThingWithCategoriesSpecificValues> {
|
||||||
|
/**
|
||||||
|
* Translated fields of a thing with categories
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCThingWithCategoriesTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of the "to do"
|
||||||
|
*/
|
||||||
|
type: SCThingType.ToDo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,27 +85,27 @@ export class SCToDoMeta extends SCThingMeta implements SCMetaTranslations<SCToDo
|
|||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
type: 'ToDo',
|
type: 'ToDo',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<string,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.ToDo,
|
type: SCThingType.ToDo,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,13 +12,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
import {SCThing, SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
import {SCMetaTranslations} from '../types/i18n';
|
import {SCMetaTranslations} from '../types/i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tour without references
|
* A tour without references
|
||||||
*/
|
*/
|
||||||
export interface SCTourWithoutReferences extends SCThing {
|
export interface SCTourWithoutReferences
|
||||||
|
extends SCThingWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Init script for the tour
|
* Init script for the tour
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +41,8 @@ export interface SCTourWithoutReferences extends SCThing {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCTour extends SCTourWithoutReferences {
|
export interface SCTour
|
||||||
|
extends SCTourWithoutReferences, SCThing {
|
||||||
/**
|
/**
|
||||||
* Type of a tour
|
* Type of a tour
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +52,9 @@ export interface SCTour extends SCTourWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a tour
|
* Meta information about a tour
|
||||||
*/
|
*/
|
||||||
export class SCTourMeta extends SCThingMeta implements SCMetaTranslations<SCTour> {
|
export class SCTourMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCTour> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ import {SCPersonWithoutReferences} from './Person';
|
|||||||
/**
|
/**
|
||||||
* A video without references
|
* A video without references
|
||||||
*/
|
*/
|
||||||
export interface SCVideoWithoutReferences extends SCCreativeWorkWithoutReferences {
|
export interface SCVideoWithoutReferences
|
||||||
|
extends SCCreativeWorkWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The Duration of the Video
|
* The Duration of the Video
|
||||||
*/
|
*/
|
||||||
@@ -102,7 +103,8 @@ export interface SCVideoTrack {
|
|||||||
*
|
*
|
||||||
* @validatable
|
* @validatable
|
||||||
*/
|
*/
|
||||||
export interface SCVideo extends SCCreativeWork, SCVideoWithoutReferences {
|
export interface SCVideo
|
||||||
|
extends SCCreativeWork, SCVideoWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Persons acting in the Video
|
* Persons acting in the Video
|
||||||
*/
|
*/
|
||||||
@@ -117,29 +119,31 @@ export interface SCVideo extends SCCreativeWork, SCVideoWithoutReferences {
|
|||||||
/**
|
/**
|
||||||
* Meta information about a video
|
* Meta information about a video
|
||||||
*/
|
*/
|
||||||
export class SCVideoMeta extends SCThingMeta implements SCMetaTranslations<SCVideo> {
|
export class SCVideoMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCVideo> {
|
||||||
/**
|
/**
|
||||||
* Translations of fields
|
* Translations of fields
|
||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldTranslations.en,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of values of fields
|
* Translations of values of fields
|
||||||
*/
|
*/
|
||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.de,
|
||||||
type: 'Video',
|
type: 'Video',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
... SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
...SCCreativeWorkMeta.getInstance().fieldValueTranslations.en,
|
||||||
type: SCThingType.Video,
|
type: SCThingType.Video,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCThingWithTranslations} from '../base/ThingWithTranslations';
|
|
||||||
import {SCBulkResponse} from '../protocol/routes/bulk/BulkResponse';
|
import {SCBulkResponse} from '../protocol/routes/bulk/BulkResponse';
|
||||||
import {SCMultiSearchResponse} from '../protocol/routes/search/MultiSearchResponse';
|
import {SCMultiSearchResponse} from '../protocol/routes/search/MultiSearchResponse';
|
||||||
import {SCSearchResponse} from '../protocol/routes/search/SearchResponse';
|
import {SCSearchResponse} from '../protocol/routes/search/SearchResponse';
|
||||||
import {SCThing, SCThingType} from '../Thing';
|
import {SCThing, SCThingTranslatableProperties, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||||
|
import {SCTranslations} from './i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type guard to check if something is a SCThing
|
* Type guard to check if something is a SCThing
|
||||||
*
|
*
|
||||||
* @param {any} something Something to check
|
* @param something Something to check
|
||||||
*/
|
*/
|
||||||
export function isThing(something: any): something is SCThing {
|
export function isThing(something: any): something is SCThing {
|
||||||
return (
|
return (
|
||||||
@@ -34,16 +34,17 @@ export function isThing(something: any): something is SCThing {
|
|||||||
/**
|
/**
|
||||||
* Type guard to check if translations exist
|
* Type guard to check if translations exist
|
||||||
*
|
*
|
||||||
* @param {SCThing} thing Thing to check
|
* @param thing Thing to check
|
||||||
*/
|
*/
|
||||||
export function isThingWithTranslations(thing: SCThing): thing is SCThingWithTranslations {
|
export function isThingWithTranslations(thing: SCThingWithoutReferences)
|
||||||
|
: thing is SCThingWithoutReferences & { translations: SCTranslations<SCThingTranslatableProperties> } {
|
||||||
return typeof thing.translations !== 'undefined';
|
return typeof thing.translations !== 'undefined';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type guard to check if something is a bulk response
|
* Type guard to check if something is a bulk response
|
||||||
*
|
*
|
||||||
* @param {any} something Something to check
|
* @param something Something to check
|
||||||
*/
|
*/
|
||||||
export function isBulkResponse(something: any): something is SCBulkResponse {
|
export function isBulkResponse(something: any): something is SCBulkResponse {
|
||||||
return typeof something.expiration === 'string'
|
return typeof something.expiration === 'string'
|
||||||
@@ -56,7 +57,7 @@ export function isBulkResponse(something: any): something is SCBulkResponse {
|
|||||||
/**
|
/**
|
||||||
* Type guard to check if something is a search response
|
* Type guard to check if something is a search response
|
||||||
*
|
*
|
||||||
* @param {any} something Something to check
|
* @param something Something to check
|
||||||
*/
|
*/
|
||||||
export function isSearchResponse(something: any): something is SCSearchResponse {
|
export function isSearchResponse(something: any): something is SCSearchResponse {
|
||||||
return Array.isArray(something.data)
|
return Array.isArray(something.data)
|
||||||
|
|||||||
Reference in New Issue
Block a user