From 89f0943c08854acbc407562f813c4dde1e26fcf6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9gory=20Burri?= Date: Thu, 15 Aug 2019 15:52:49 +0200 Subject: [PATCH] Beginning of the model --- backend/src/model.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 backend/src/model.rs 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 -- 2.43.0