diff options
Diffstat (limited to 'backend/src/schema.rs')
| -rw-r--r-- | backend/src/schema.rs | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/backend/src/schema.rs b/backend/src/schema.rs new file mode 100644 index 0000000..d98a629 --- /dev/null +++ b/backend/src/schema.rs @@ -0,0 +1,71 @@ +// @generated automatically by Diesel CLI. + +diesel::table! { + accounts (id) { + id -> Integer, + name -> Text, + opening_balance -> Integer, + opening_date -> Text, + } +} + +diesel::table! { + budget_updates (id) { + id -> Integer, + category_id -> Integer, + date -> Text, + new_budget -> Integer, + new_period -> Integer, + } +} + +diesel::table! { + categories (id) { + id -> Integer, + name -> Text, + initial_budget -> Integer, + initial_period -> Integer, + } +} + +diesel::table! { + category_transactions (id) { + id -> Integer, + description -> Text, + quantity -> Integer, + category_id -> Integer, + } +} + +diesel::table! { + category_transfers (id) { + id -> Integer, + description -> Text, + quantity -> Integer, + from_category_id -> Integer, + to_category_id -> Integer, + } +} + +diesel::table! { + transactions (id) { + id -> Integer, + description -> Text, + payee -> Text, + quantity -> Integer, + account_id -> Integer, + } +} + +diesel::joinable!(budget_updates -> categories (category_id)); +diesel::joinable!(category_transactions -> categories (category_id)); +diesel::joinable!(transactions -> accounts (account_id)); + +diesel::allow_tables_to_appear_in_same_query!( + accounts, + budget_updates, + categories, + category_transactions, + category_transfers, + transactions, +); |
