diff options
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,); |