aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2021-12-30 11:45:59 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2021-12-30 11:45:59 +0100
commit3edf5d60f54bfd0cd2c818e5fb1ca133e324325d (patch)
tree9b8bd057e3e27c9e2488957f02ffc8de4ed4c438 /planetwars-server/src/schema.rs
parent71ee6c99e963d96286cae8d0bfc2f20a9c9c920b (diff)
downloadplanetwars.dev-3edf5d60f54bfd0cd2c818e5fb1ca133e324325d.tar.xz
planetwars.dev-3edf5d60f54bfd0cd2c818e5fb1ca133e324325d.zip
rename to planetwars-server
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r--planetwars-server/src/schema.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs
new file mode 100644
index 0000000..bf58434
--- /dev/null
+++ b/planetwars-server/src/schema.rs
@@ -0,0 +1,39 @@
+table! {
+ bots (id) {
+ id -> Int4,
+ owner_id -> Int4,
+ name -> Text,
+ }
+}
+
+table! {
+ code_bundles (id) {
+ id -> Int4,
+ bot_id -> Int4,
+ path -> Text,
+ created_at -> Timestamp,
+ }
+}
+
+table! {
+ sessions (id) {
+ id -> Int4,
+ user_id -> Int4,
+ token -> Varchar,
+ }
+}
+
+table! {
+ users (id) {
+ id -> Int4,
+ username -> Varchar,
+ password_salt -> Bytea,
+ password_hash -> Bytea,
+ }
+}
+
+joinable!(bots -> users (owner_id));
+joinable!(code_bundles -> bots (bot_id));
+joinable!(sessions -> users (user_id));
+
+allow_tables_to_appear_in_same_query!(bots, code_bundles, sessions, users,);