about summary refs log tree commit diff
path: root/src/models.rs
diff options
context:
space:
mode:
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 42d8d11649ff..fc67c260a448 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -17,3 +17,10 @@ pub struct Post {
     pub body: String,
     pub posted: DateTime<Utc>,
 }
+
+#[derive(Insertable)]
+#[table_name="threads"]
+pub struct NewThread {
+    pub title: String,
+    pub body: String,
+}