X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=backend%2Fsrc%2Fmodel.rs;h=719ed21e7009e3e7bea92339fac3883257961971;hb=8a3fef096d720666dc8a54789aee02250642d8a1;hp=4984cdd6844d42625a7ad45a2c105ca36471d355;hpb=cdb883c3c4ccbb82774ecfbfad059f3392e75432;p=recipes.git 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(),