aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/RecipePreview.js
blob: 7470d757adb2d3e866fce5c1c38c2e21ead03d15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// @flow

export default class RecipePreview {
  id = '';
  name = '';
  icon = ''; // TODO: check if this isn't replaced by `icons`
  featured = false;

  constructor(data) {
    if (!data.id) {
      throw Error('RecipePreview requires Id');
    }

    Object.assign(this, data);
  }
}