From 05d346b5c658e8c58e2a09617cb5ac9cb888bd6d Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Mon, 28 Jan 2019 11:14:53 +0100 Subject: [PATCH] refactor: resolve discussions from last commit --- src/core/things/Dish.ts | 46 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/core/things/Dish.ts b/src/core/things/Dish.ts index 86b6e53b..84c82050 100644 --- a/src/core/things/Dish.ts +++ b/src/core/things/Dish.ts @@ -31,7 +31,7 @@ import {SCTranslations} from '../types/i18n'; */ export interface SCDishWithoutReferences extends SCThingWithCategoriesWithoutReferences, + SCThingWithCategoriesSpecificValues>, SCThingThatCanBeOffered { /** * Additives of the dish @@ -46,7 +46,7 @@ export interface SCDishWithoutReferences /** * Characteristics of the dish */ - characteristics?: Characteristic[]; + characteristics?: SCDishCharacteristic[]; /** * Nutrition information (calories and nutrients with amounts) @@ -90,28 +90,6 @@ export interface SCDishTranslatableProperties extends SCThingWithCategoriesTranslatableProperties, SCThingThatCanBeOfferedTranslatableProperties { } -/** - * Composition of properties of a food characteristic - */ -export interface Characteristic{ - - /** - * Name of the characteristic - */ - name: string; - - /** - * The superscript text, that will be shown as a reference to this Characteristic - */ - superscriptText?: string; - - /** - * Image of the characteristic - */ - image?: string; - -} - /** * Dish meta data */ @@ -124,6 +102,26 @@ export class SCDishMeta extends SCThingMeta { }; } +/** + * Composition of properties of a food characteristic + */ +export interface SCDishCharacteristic { + /** + * URL to the image of the characteristic + */ + image?: string; + + /** + * Name of the characteristic + */ + name: string; + + /** + * The superscript text, that will be shown as a reference + */ + supScript?: string; +} + /** * A list of categories for dishes */