X-Git-Url: http://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=backend%2Fsrc%2Fmodel.rs;fp=backend%2Fsrc%2Fmodel.rs;h=719ed21e7009e3e7bea92339fac3883257961971;hp=4984cdd6844d42625a7ad45a2c105ca36471d355;hb=b6235fb76ce82f96503cda83eebe8106320b2a0d;hpb=45d4867cb37ce8d7007c4d98de70d81d0b705b92 diff --git a/backend/src/model.rs b/backend/src/model.rs index 4984cdd..719ed21 100644 --- a/backend/src/model.rs +++ b/backend/src/model.rs @@ -1,6 +1,7 @@ pub struct Recipe { pub id: i32, pub title: String, + pub description: Option, pub estimate_time: Option, // [min]. pub difficulty: Option, @@ -9,10 +10,11 @@ pub struct Recipe { } impl Recipe { - pub fn new(id: i32, title: String) -> Recipe { + pub fn new(id: i32, title: String, description: Option) -> Recipe { Recipe { id, title, + description, estimate_time: None, difficulty: None, process: Vec::new(),