diff options
| author | Nathan Perry <avaglir@gmail.com> | 2019-04-10 01:56:47 -0400 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2019-04-10 01:57:47 -0400 |
| commit | f11a5ae72e7c3be7575761dde9669f2d93e67b59 (patch) | |
| tree | 55444e618d8a3780db683837006b471162e5fd05 /src/db/models.rs | |
| parent | fcf5e989f995484987b3474494a8de5ca23d1633 (diff) | |
write meme `query` command
Diffstat (limited to 'src/db/models.rs')
| -rw-r--r-- | src/db/models.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/models.rs b/src/db/models.rs index 66e161a..a01a9c1 100644 --- a/src/db/models.rs +++ b/src/db/models.rs @@ -7,7 +7,7 @@ use crate::{ Result, }; -#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[derive(Queryable, Identifiable, PartialEq, Debug, Clone)] #[table_name="memes"] pub struct Meme { pub id: i32, @@ -32,7 +32,7 @@ impl Meme { } } -#[derive(Insertable, PartialEq, Debug)] +#[derive(Insertable, PartialEq, Debug, Clone)] #[table_name="memes"] pub struct NewMeme { pub title: String, @@ -157,7 +157,7 @@ pub struct NewImage { } -#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[derive(Queryable, Identifiable, PartialEq, Debug, Clone)] #[table_name="metadata"] pub struct Metadata { pub id: i32, |
