summaryrefslogtreecommitdiff
path: root/schist_core/schist_models/src/schema.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2025-08-15 16:02:40 +0000
committerjoeac <me@joeac.net>2025-08-15 16:02:40 +0000
commit703496a49315f7b67442abf0e0df3c41d3605d3b (patch)
tree8e92f3842710162f3b26e910eb931950c1049f07 /schist_core/schist_models/src/schema.rs
parent8d714f760bd0349560d464583a151a04a19de1c9 (diff)
task-012 (#2)
Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com> Reviewed-on: https://git.joeac.net/joeac/schist/pulls/2 Co-authored-by: Joe Carstairs <me@joeac.net> Co-committed-by: Joe Carstairs <me@joeac.net>
Diffstat (limited to 'schist_core/schist_models/src/schema.rs')
-rw-r--r--schist_core/schist_models/src/schema.rs59
1 files changed, 29 insertions, 30 deletions
diff --git a/schist_core/schist_models/src/schema.rs b/schist_core/schist_models/src/schema.rs
index 1c9fc62..3799479 100644
--- a/schist_core/schist_models/src/schema.rs
+++ b/schist_core/schist_models/src/schema.rs
@@ -3,9 +3,9 @@
diesel::table! {
account_transfers (id) {
id -> Integer,
+ amount -> Integer,
date -> Text,
description -> Text,
- quantity -> Integer,
from_account_id -> Integer,
to_account_id -> Integer,
}
@@ -21,69 +21,68 @@ diesel::table! {
}
diesel::table! {
- budget_drips (id) {
+ bucket_transfers (id) {
id -> Integer,
- bucket_id -> Integer,
- date -> Text,
- quantity -> Integer,
+ amount -> Integer,
+ description -> Text,
+ from_bucket_id -> Integer,
+ to_bucket_id -> Integer,
}
}
diesel::table! {
buckets (id) {
id -> Integer,
+ balance -> Nullable<Integer>,
+ balance_cache_key -> Nullable<Text>,
+ bucket_group -> Text,
name -> Text,
- balance -> Integer,
- balance_date -> Text,
- budget_period -> Integer,
- budget_period_unit -> Text,
- budget_quantity -> Integer,
- group -> Text,
}
}
diesel::table! {
- bucket_transfers (id) {
+ drips (id) {
id -> Integer,
- description -> Text,
- quantity -> Integer,
- from_bucket_id -> Integer,
- to_bucket_id -> Integer,
+ amount -> Integer,
+ bucket_id -> Integer,
+ date -> Text,
+ inserted_at_unix_seconds -> Integer,
+ pipe_id -> Integer,
}
}
diesel::table! {
- transaction_categorisations (id) {
+ pipes (id) {
id -> Integer,
- description -> Text,
- quantity -> Integer,
- transaction_id -> Integer,
+ amount -> Integer,
bucket_id -> Integer,
+ period -> Text,
+ start_date -> Text,
}
}
diesel::table! {
transactions (id) {
id -> Integer,
- description -> Text,
- payee -> Text,
- quantity -> Integer,
- date -> Text,
account_id -> Integer,
+ amount -> Integer,
+ bucket_id -> Nullable<Integer>,
+ counterparty -> Text,
+ date -> Text,
+ description -> Text,
}
}
-diesel::joinable!(budget_drips -> buckets (bucket_id));
-diesel::joinable!(transaction_categorisations -> buckets (bucket_id));
-diesel::joinable!(transaction_categorisations -> transactions (transaction_id));
+diesel::joinable!(drips -> buckets (bucket_id));
+diesel::joinable!(pipes -> buckets (bucket_id));
diesel::joinable!(transactions -> accounts (account_id));
diesel::allow_tables_to_appear_in_same_query!(
account_transfers,
accounts,
- budget_drips,
- buckets,
bucket_transfers,
- transaction_categorisations,
+ buckets,
+ drips,
+ pipes,
transactions,
);