diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-13 22:41:20 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-13 22:41:20 +0100 |
commit | eabeb7ed7b641dea0b8e71ab33ab97b4ed7a4cda (patch) | |
tree | 9cd2f38290fa059020feb049d8a2e2e91adac68b /backend/src/schema.rs | |
parent | 8b4440f7236b0972c1a804eea4c8305b958ad03c (diff) | |
download | planetwars.dev-eabeb7ed7b641dea0b8e71ab33ab97b4ed7a4cda.tar.xz planetwars.dev-eabeb7ed7b641dea0b8e71ab33ab97b4ed7a4cda.zip |
start implementing basic login functionality
Diffstat (limited to 'backend/src/schema.rs')
-rw-r--r-- | backend/src/schema.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/backend/src/schema.rs b/backend/src/schema.rs new file mode 100644 index 0000000..04ecbd7 --- /dev/null +++ b/backend/src/schema.rs @@ -0,0 +1,20 @@ +table! { + sessions (id) { + id -> Int4, + user_id -> Int4, + token -> Varchar, + } +} + +table! { + users (id) { + id -> Int4, + username -> Varchar, + password_salt -> Bytea, + password_hash -> Bytea, + } +} + +joinable!(sessions -> users (user_id)); + +allow_tables_to_appear_in_same_query!(sessions, users,); |