diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-23 21:07:56 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-23 21:07:56 -0600 |
commit | 8852f0b7090c612f1d04a60becb55bbe56441eda (patch) | |
tree | f9fe2c8d3782ad2c09bb9fa4171ecb0653cc92b0 /examples/tutorial02/polls | |
parent | 88d527d574567420d7aa72f37205bd6b345b8dd7 (diff) | |
download | tosin-8852f0b7090c612f1d04a60becb55bbe56441eda.tar.gz tosin-8852f0b7090c612f1d04a60becb55bbe56441eda.zip |
start impling diesel::Queryable for Models
Diffstat (limited to 'examples/tutorial02/polls')
-rw-r--r-- | examples/tutorial02/polls/models.rs | 4 |
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)] |