about summary refs log tree commit diff
path: root/src/models.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-08T18·19+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-08T18·19+0200
commit148dfc39c80266e9c3077737e4258739dba7d86a (patch)
treebbb175bac396c889376dc04286a17773c3d82a67 /src/models.rs
parent55b28f81369b6ea35ea08b67958674198fe94a4d (diff)
feat(db/models): Add handling of CreatePost message
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/models.rs b/src/models.rs
index d85a54e03090..28b1caa7cf32 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -24,3 +24,10 @@ pub struct NewThread {
     pub title: String,
     pub body: String,
 }
+
+#[derive(Deserialize, Insertable)]
+#[table_name="posts"]
+pub struct NewPost {
+    pub thread_id: i32,
+    pub body: String,
+}