summaryrefslogtreecommitdiff
path: root/transformers/actualbudget_transformer/actualbudget_models/src/actualbudget_schema.rs
blob: 3a26344d104ab0a114877998ab075c7d278f4826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diesel::table! {
    accounts (id) {
        id -> Text,
        name -> Text,
    }
}

diesel::table! {
    categories (id) {
        id -> Text,
        #[sql_name = "cat_group"]
        group_id -> Nullable<Text>,
        name -> Text,
    }
}

diesel::table! {
    category_groups (id) {
        id -> Text,
        name -> Nullable<Text>,
    }
}


diesel::table! {
    v_transactions (id) {
        id -> Text,
        is_parent -> Bool,
        is_child -> Bool,
        parent_id -> Nullable<Text>,
        #[sql_name = "account"]
        account_id -> Text,
        #[sql_name = "category"]
        category_id -> Nullable<Text>,
        amount -> Integer,
        payee -> Nullable<Text>,
        notes -> Nullable<Text>,
        date -> Integer,
        transfer_id -> Nullable<Text>,
        starting_balance_flag -> Integer,
        // imported_id -> Text,
        // error -> Text,
        // imported_payee -> Text,
        // sort_order -> Real,
        // cleared -> Integer,
        // reconciled -> Integer,
        // tombstone -> Integer,
        // schedule -> Text,
    }
}

diesel::table! {
    payees (id) {
        id -> Text,
        name -> Text,
        #[sql_name = "transfer_acct"]
        transfer_account_id -> Nullable<Text>,
        // category -> Nullable<Text>,
        // favorite -> Bool,
        // tombstone -> Integer,
    }
}

diesel::table! {
    zero_budgets (id) {
        id -> Text,
        month -> Integer,
        #[sql_name = "category"]
        category_id -> Text,
        amount -> Integer,
        #[sql_name = "carryover"]
        do_carry_over -> Bool,
        // goal -> Integer,
        // long_goal -> Integer,
    }
}