summaryrefslogtreecommitdiff
path: root/rust/schist_actualbudget_importer/src/schema.rs
blob: a872231a6962b2e8ad840ad30d6498753b98fbad (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
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,
    }
}