aboutsummaryrefslogtreecommitdiffstats
path: root/src/schema.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-03-21 20:04:39 +0000
committerGitHub <noreply@github.com>2021-03-21 20:04:39 +0000
commitc9579cb9ca2a6a165d10f128e0af1dfd372e0c03 (patch)
tree1d4feecb422aae3cde1cc7cad54ccc73b2dae410 /src/schema.rs
parentAdd TUI, resolve #19, #17, #16 (#21) (diff)
downloadatuin-c9579cb9ca2a6a165d10f128e0af1dfd372e0c03.zip
Implement server (#23)
* Add initial database and server setup * Set up all routes, auth, etc * Implement sessions, password auth, hashing with argon2, and history storage
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs
new file mode 100644
index 00000000..efa9ddcc
--- /dev/null
+++ b/src/schema.rs
@@ -0,0 +1,28 @@
+table! {
+ history (id) {
+ id -> Int8,
+ client_id -> Text,
+ user_id -> Int8,
+ mac -> Varchar,
+ timestamp -> Timestamp,
+ data -> Varchar,
+ }
+}
+
+table! {
+ sessions (id) {
+ id -> Int8,
+ user_id -> Int8,
+ token -> Varchar,
+ }
+}
+
+table! {
+ users (id) {
+ id -> Int8,
+ email -> Varchar,
+ password -> Varchar,
+ }
+}
+
+allow_tables_to_appear_in_same_query!(history, sessions, users,);