From: Grégory Burri Date: Thu, 15 Aug 2019 13:52:49 +0000 (+0200) Subject: Beginning of the model X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=89f0943c08854acbc407562f813c4dde1e26fcf6;p=recipes.git Beginning of the model --- diff --git a/backend/src/model.rs b/backend/src/model.rs new file mode 100644 index 0000000..ced209d --- /dev/null +++ b/backend/src/model.rs @@ -0,0 +1,34 @@ +struct Recipe { + ingredients: Vec, + process: Vec, +} + +struct Ingredient { + quantity: Quantity, + name: String, +} + +struct Quantity { + value: f32, + unit: String, +} +struct Group { + name: String, + steps: Vec, +} + +struct Step { + action: String, + input: Vec, + output: Vec, +} + +struct IntermediateSubstance { + name: String, + quantity: Option, +} + +enum StepInput { + Ingredient(Ingredient), + IntermediateSubstance, +} \ No newline at end of file