aboutsummaryrefslogtreecommitdiff
path: root/src/structures.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2020-11-19 23:53:52 +0000
committerFuwn <[email protected]>2020-11-19 23:53:52 +0000
commit26b647ca3f006662676690e6b99bfbfb32167738 (patch)
tree1815e651090e928341b7f88be6781028a400b19a /src/structures.rs
parentfeat: limitations in readme (diff)
downloadchan-26b647ca3f006662676690e6b99bfbfb32167738.tar.xz
chan-26b647ca3f006662676690e6b99bfbfb32167738.zip
feat, chore (desc)
feat: - add example database - ADD BOARDS - 404 page - better ui (bootstrap) chore: - move structures to strucutres file - various capitalizations
Diffstat (limited to 'src/structures.rs')
-rw-r--r--src/structures.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/structures.rs b/src/structures.rs
new file mode 100644
index 0000000..8d0efb3
--- /dev/null
+++ b/src/structures.rs
@@ -0,0 +1,16 @@
+/// The format a valid SQLlite thread entry should have.
+#[derive(FromForm, Debug, Serialize, Deserialize)]
+pub struct Thread {
+ pub board: String,
+ pub name: String,
+ pub comment: String
+}
+
+/// The format a valid SQLlite thread entry should have.
+#[derive(FromForm, Debug, Serialize, Deserialize, PartialEq)]
+pub struct Board {
+ pub tag: String,
+ pub name: String,
+ pub nsfw: i32,
+ pub disabled: i32
+}