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

export default class RecipePreview {
  id = '';

  name = '';

  icon = '';

  featured = false;

  aliases = [];

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

    Object.assign(this, data);
  }
}