Update dependencies
[recipes.git] / backend / src / model.rs
1 struct Recipe {
2 ingredients: Vec<Ingredient>,
3 process: Vec<Group>,
4 }
5
6 struct Ingredient {
7 quantity: Quantity,
8 name: String,
9 }
10
11 struct Quantity {
12 value: f32,
13 unit: String,
14 }
15 struct Group {
16 name: String,
17 steps: Vec<Step>,
18 }
19
20 struct Step {
21 action: String,
22 input: Vec<StepInput>,
23 output: Vec<IntermediateSubstance>,
24 }
25
26 struct IntermediateSubstance {
27 name: String,
28 quantity: Option<Quantity>,
29 }
30
31 enum StepInput {
32 Ingredient(Ingredient),
33 IntermediateSubstance,
34 }