mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
fix: adjust model to remove references from things without references
Fixes #69
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* 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, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
|
||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
|
||||
import {SCGeoInformation} from '../types/GeoInformation';
|
||||
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
|
||||
import {SCPostalAddress} from '../types/PostalAddress';
|
||||
@@ -20,7 +20,8 @@ import {SCPostalAddress} from '../types/PostalAddress';
|
||||
/**
|
||||
* A place without references
|
||||
*/
|
||||
export interface SCPlaceWithoutReferences extends SCThing {
|
||||
export interface SCPlaceWithoutReferences
|
||||
extends SCThingWithoutReferences {
|
||||
/**
|
||||
* Address of the place
|
||||
*/
|
||||
@@ -44,38 +45,53 @@ export interface SCPlaceWithoutReferences extends SCThing {
|
||||
* Translated fields of a place
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Meta information about creative works
|
||||
*/
|
||||
export class SCPlaceWithoutReferencesMeta extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
|
||||
export class SCPlaceWithoutReferencesMeta
|
||||
extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
|
||||
/**
|
||||
* Translations of fields
|
||||
*/
|
||||
fieldTranslations = {
|
||||
de: {
|
||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
||||
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||
},
|
||||
en: {
|
||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
||||
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Translations of values of fields
|
||||
*/
|
||||
fieldValueTranslations = {
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||
},
|
||||
en: {
|
||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user