diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-10-01 22:38:55 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-10-01 22:38:55 +0200 |
commit | 1767eb2dafbab8b19cc4cf0a9a890539ce2948c1 (patch) | |
tree | e8b8942bb9383d2a3986c2d549b1c53863c69ca1 /src/models.rs | |
parent | b62344371e4ce07aa19da5e7faeef322e907653e (diff) | |
download | rocket-blog-1767eb2dafbab8b19cc4cf0a9a890539ce2948c1.tar.gz rocket-blog-1767eb2dafbab8b19cc4cf0a9a890539ce2948c1.tar.bz2 rocket-blog-1767eb2dafbab8b19cc4cf0a9a890539ce2948c1.zip |
Add schema for posts, and display them on index page.
Diffstat (limited to 'src/models.rs')
-rw-r--r-- | src/models.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/models.rs b/src/models.rs new file mode 100644 index 0000000..110cabe --- /dev/null +++ b/src/models.rs @@ -0,0 +1,7 @@ +#[derive(Queryable)] +pub struct Post { + pub id: i32, + pub title: String, + pub body: String, + pub published: bool, +} |