From c9579cb9ca2a6a165d10f128e0af1dfd372e0c03 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sun, 21 Mar 2021 20:04:39 +0000 Subject: 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 --- src/schema.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/schema.rs (limited to 'src/schema.rs') 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,); -- cgit v1.3.1