diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-19 00:16:46 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-19 00:16:46 +0100 |
commit | 52242b03f1af7f73e73592c2e5ee2bc54813a64d (patch) | |
tree | 1ecafcbebad7b6f8ae71670afbe2921c975196fa /backend/src/schema.rs | |
parent | 2dbb085008f68ed56675cf23ea6e1c89af632ea9 (diff) | |
download | planetwars.dev-52242b03f1af7f73e73592c2e5ee2bc54813a64d.tar.xz planetwars.dev-52242b03f1af7f73e73592c2e5ee2bc54813a64d.zip |
simple bot uploads
Diffstat (limited to 'backend/src/schema.rs')
-rw-r--r-- | backend/src/schema.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/backend/src/schema.rs b/backend/src/schema.rs index 04ecbd7..bf58434 100644 --- a/backend/src/schema.rs +++ b/backend/src/schema.rs @@ -1,4 +1,21 @@ 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, @@ -15,6 +32,8 @@ table! { } } +joinable!(bots -> users (owner_id)); +joinable!(code_bundles -> bots (bot_id)); joinable!(sessions -> users (user_id)); -allow_tables_to_appear_in_same_query!(sessions, users,); +allow_tables_to_appear_in_same_query!(bots, code_bundles, sessions, users,); |