From 52242b03f1af7f73e73592c2e5ee2bc54813a64d Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sun, 19 Dec 2021 00:16:46 +0100 Subject: simple bot uploads --- backend/src/schema.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'backend/src/schema.rs') 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,3 +1,20 @@ +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, @@ -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,); -- cgit v1.2.3