-
-
Notifications
You must be signed in to change notification settings - Fork 675
/
Copy pathrecipe.data.ts
43 lines (41 loc) · 1.15 KB
/
recipe.data.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { sampleCooks } from "./cook.data";
import { Difficulty } from "./difficulty.enum";
import { Recipe } from "./recipe.type";
function createRecipe(recipeData: Partial<Recipe>): Recipe {
return Object.assign(new Recipe(), recipeData);
}
export const sampleRecipes = [
createRecipe({
title: "Recipe 1",
description: "Desc 1",
preparationDifficulty: Difficulty.Easy,
ingredients: ["one", "two", "three"],
cook: sampleCooks[1],
}),
createRecipe({
title: "Recipe 2",
description: "Desc 2",
preparationDifficulty: Difficulty.Easy,
ingredients: ["four", "five", "six"],
cook: sampleCooks[0],
}),
createRecipe({
title: "Recipe 3",
preparationDifficulty: Difficulty.Beginner,
ingredients: ["seven", "eight", "nine"],
cook: sampleCooks[1],
}),
createRecipe({
title: "Recipe 4",
description: "Desc 4",
preparationDifficulty: Difficulty.MasterChef,
ingredients: ["ten", "eleven", "twelve"],
cook: sampleCooks[0],
}),
createRecipe({
title: "Recipe 5",
preparationDifficulty: Difficulty.Hard,
ingredients: ["thirteen", "fourteen", "fifteen"],
cook: sampleCooks[0],
}),
];