diff options
| author | Joe Carstairs <me@joeac.net> | 2024-11-17 13:00:53 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-11-17 13:00:53 +0000 |
| commit | 19f5040910ad297ecd618f67675cd2fa00771bdd (patch) | |
| tree | 403d6e0a8924b18678d41d5d5fccf0c26bbf7d82 /rust/actualbudget_models/src/actualbudget_schema.rs | |
| parent | 99fa72e2b9d572e00cd232bd55a3fa24722c3134 (diff) | |
Refactors Actualbudget importer
Diffstat (limited to 'rust/actualbudget_models/src/actualbudget_schema.rs')
| -rw-r--r-- | rust/actualbudget_models/src/actualbudget_schema.rs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/rust/actualbudget_models/src/actualbudget_schema.rs b/rust/actualbudget_models/src/actualbudget_schema.rs new file mode 100644 index 0000000..a872231 --- /dev/null +++ b/rust/actualbudget_models/src/actualbudget_schema.rs @@ -0,0 +1,47 @@ +diesel::table! { + accounts (id) { + id -> Text, + name -> Text, + } +} + +diesel::table! { + categories (id) { + id -> Text, + name -> Text, + } +} + +diesel::table! { + transactions (id) { + id -> Text, + #[sql_name = "isParent"] + is_parent -> Bool, + #[sql_name = "isChild"] + is_child -> Bool, + #[sql_name = "acct"] + account_id -> Text, + #[sql_name = "category"] + category_id -> Text, + amount -> Integer, + #[sql_name = "description"] + payee -> Text, + notes -> Text, + date -> Integer, + parent_id -> Nullable<Text>, + } +} + +diesel::table! { + zero_budgets (id) { + id -> Text, + month -> Integer, + #[sql_name = "category"] + category_id -> Text, + amount -> Integer, + #[sql_name = "carryover"] + do_carry_over -> Integer, + // goal -> Integer, + // long_goal -> Integer, + } +} |
