aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial02/polls/models.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorial02/polls/models.rs')
-rw-r--r--examples/tutorial02/polls/models.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/tutorial02/polls/models.rs b/examples/tutorial02/polls/models.rs
index fb8be8f..d62f219 100644
--- a/examples/tutorial02/polls/models.rs
+++ b/examples/tutorial02/polls/models.rs
@@ -1,6 +1,6 @@
use tosin::db::models::{Model, Id, gather};
-#[derive(Model)]
+#[derive(Model, PartialEq, Debug)]
pub struct Question {
id: Option<Id>,
#[model(max_length=200)]
@@ -9,7 +9,7 @@ pub struct Question {
pub_date: time::PrimitiveDateTime,
}
-#[derive(Model)]
+#[derive(Model, PartialEq, Debug)]
pub struct Choice {
id: Option<Id>,
#[model(Question, on_delete=Cascade)]