diff options
| author | Joe Carstairs <me@joeac.net> | 2024-11-17 09:22:32 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-11-17 09:22:32 +0000 |
| commit | 1a494937021561595d0fb29e26fb707aef9e55de (patch) | |
| tree | 91234bbc9d1946946cf93d4d57b0b5a13a09de0a /backend/actualbudget_importer/src/schema.rs | |
| parent | 3c7218be1446f8cf914063b1c52c1cbdc8497c8c (diff) | |
Refactors rust code into workspace
Diffstat (limited to 'backend/actualbudget_importer/src/schema.rs')
| -rw-r--r-- | backend/actualbudget_importer/src/schema.rs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/backend/actualbudget_importer/src/schema.rs b/backend/actualbudget_importer/src/schema.rs new file mode 100644 index 0000000..a872231 --- /dev/null +++ b/backend/actualbudget_importer/src/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, + } +} |
