From d781dd6de5cc7572b9218df959247b93cb2db305 Mon Sep 17 00:00:00 2001 From: Roman Klopsch Date: Tue, 18 Jun 2019 10:29:57 +0200 Subject: [PATCH] feat: add new field receivingOrganisations to message --- src/things/message.ts | 8 ++++++++ test/resources/Message.3.json | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/things/message.ts b/src/things/message.ts index decc4d81..6199f178 100644 --- a/src/things/message.ts +++ b/src/things/message.ts @@ -22,6 +22,7 @@ import { } from './abstract/creative-work'; import {SCThingMeta, SCThingType} from './abstract/thing'; import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered'; +import {SCOrganizationWithoutReferences} from './organization'; /** * A message without references @@ -45,6 +46,11 @@ export interface SCMessageWithoutReferences */ messageBody: string; + /** + * Recipients of the message + */ + receivingOrganizations?: SCOrganizationWithoutReferences[]; + /** * Translated fields of a message */ @@ -112,6 +118,7 @@ export class SCMessageMeta audiences: 'Zielgruppen', dateCreated: 'Erstellungsdatum', messageBody: 'Nachrichteninhalt', + receivingOrganizations: 'empfangende Organisationen', }, en: { ...SCCreativeWorkMeta.getInstance().fieldTranslations @@ -119,6 +126,7 @@ export class SCMessageMeta audiences: 'audiences', dateCreated: 'date created', messageBody: 'message body', + receivingOrganizations: 'receiving organizations', }, }; diff --git a/test/resources/Message.3.json b/test/resources/Message.3.json index 1f864b1f..f2ded656 100644 --- a/test/resources/Message.3.json +++ b/test/resources/Message.3.json @@ -12,6 +12,11 @@ "audiences": [ "students" ], + "receivingOrganizations": [{ + "name": "TU Berlin", + "type": "organization", + "uid": "4806ef14-b631-5c20-91d1-3c627decca5a" + }], "origin": { "indexed": "2018-09-11T12:30:00Z", "name": "Dummy",