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

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

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

    Object.assign(this, data);
  }
}