aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/RecipePreview.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/RecipePreview.js')
-rw-r--r--src/models/RecipePreview.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/models/RecipePreview.js b/src/models/RecipePreview.js
new file mode 100644
index 000000000..7b497edf3
--- /dev/null
+++ b/src/models/RecipePreview.js
@@ -0,0 +1,16 @@
1// @flow
2
3export default class RecipePreview {
4 id: string = '';
5 name: string = '';
6 icon: string = ''; // TODO: check if this isn't replaced by `icons`
7 featured: bool = false;
8
9 constructor(data: Object) {
10 if (!data.id) {
11 throw Error('RecipePreview requires Id');
12 }
13
14 Object.assign(this, data);
15 }
16}