aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/RecipePreview.js
blob: 525a5c4b5442d6e0e670a11296485ec052ab5fee (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) {
    if (!data.id) {
      throw Error('RecipePreview requires Id');
    }

    Object.assign(this, data);
  }
}