working on constraint design

This commit is contained in:
2019-02-16 15:13:33 +01:00
parent 4e5aab323e
commit 619542357b
6 changed files with 176 additions and 42 deletions

View File

@@ -144,6 +144,12 @@ pub struct Recipe {
pub preparation: String,
}
impl PartialEq for Recipe {
fn eq(&self, other: &Recipe) -> bool {
self.id == other.id
}
}
#[derive(Insertable, Debug)]
#[table_name="recipes"]
pub struct NewRecipe<'a> {