mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-11 12:12:55 +00:00
refactor: untangle SCCreativeWork inheritance
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
SCCreativeWorkWithoutReferences,
|
||||
} from './abstract/creative-work';
|
||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
|
||||
import {
|
||||
SCThingWithCategoriesSpecificValues,
|
||||
SCThingWithCategoriesTranslatableProperties,
|
||||
@@ -40,6 +41,7 @@ export type SCArticleCategories = 'unipedia'
|
||||
*/
|
||||
export interface SCArticleWithoutReferences
|
||||
extends SCCreativeWorkWithoutReferences,
|
||||
SCThingThatCanBeOfferedWithoutReferences,
|
||||
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||
/**
|
||||
* Article itself as markdown
|
||||
@@ -71,7 +73,9 @@ export interface SCArticleWithoutReferences
|
||||
* @indexable
|
||||
*/
|
||||
export interface SCArticle
|
||||
extends SCCreativeWork, SCArticleWithoutReferences {
|
||||
extends SCCreativeWork,
|
||||
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||
SCArticleWithoutReferences {
|
||||
/**
|
||||
* A periodical to which this article belongs
|
||||
*/
|
||||
@@ -96,7 +100,9 @@ export interface SCArticle
|
||||
* Translatable properties of an article
|
||||
*/
|
||||
export interface SCArticleTranslatableProperties
|
||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
||||
extends SCThingWithCategoriesTranslatableProperties,
|
||||
SCThingThatCanBeOfferedTranslatableProperties,
|
||||
SCCreativeWorkTranslatableProperties {
|
||||
/**
|
||||
* Translation of the article itself as markdown
|
||||
*
|
||||
@@ -119,6 +125,7 @@ export class SCArticleMeta
|
||||
.de,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.de,
|
||||
categories: 'Format',
|
||||
reference: 'Referenz',
|
||||
articleBody: 'Artikelinhalt',
|
||||
@@ -128,6 +135,7 @@ export class SCArticleMeta
|
||||
.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.en,
|
||||
categories: 'format',
|
||||
reference: 'reference',
|
||||
articleBody: 'article body',
|
||||
@@ -141,6 +149,8 @@ export class SCArticleMeta
|
||||
de: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.de,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||
.fieldValueTranslations.de,
|
||||
categories: {
|
||||
article: 'Artikel',
|
||||
eArticle: 'E-Aufsatz',
|
||||
@@ -151,6 +161,8 @@ export class SCArticleMeta
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.en,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||
.fieldValueTranslations.en,
|
||||
type: SCThingType.Article,
|
||||
categories: {
|
||||
article: 'article',
|
||||
|
||||
Reference in New Issue
Block a user