From d5a0c6ba11b71a0c41092b540d15d9492b950de8 Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Fri, 25 Jan 2019 13:26:39 +0100 Subject: [PATCH] refactor: make characteristic a seperate type to allow additional images --- src/core/things/Dish.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/core/things/Dish.ts b/src/core/things/Dish.ts index d261818d..86b6e53b 100644 --- a/src/core/things/Dish.ts +++ b/src/core/things/Dish.ts @@ -46,7 +46,7 @@ export interface SCDishWithoutReferences /** * Characteristics of the dish */ - characteristics?: string[]; + characteristics?: Characteristic[]; /** * Nutrition information (calories and nutrients with amounts) @@ -90,6 +90,28 @@ 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 */