summaryrefslogtreecommitdiffstats
path: root/src/schema.rs
blob: 285592715141822527a5664cda1b5e23dde4a88a (plain) (blame)
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
table! {
    transactions (id) {
        id -> Unsigned<Bigint>,
        date -> Timestamp,
        sender -> Unsigned<Bigint>,
        receiver -> Unsigned<Bigint>,
        amount -> Unsigned<Bigint>,
        sender_balance -> Unsigned<Bigint>,
        receiver_balance -> Unsigned<Bigint>,
        purpose -> Varchar,
    }
}

table! {
    passwords (id) {
        id -> Unsigned<Bigint>,
        hash -> Char,
    }
}

table! {
    users (id) {
        id -> Unsigned<Bigint>,
        power_level -> Integer,
        name -> Varchar,
        created -> Timestamp,
        balance -> Unsigned<Bigint>,
    }
}

joinable!(passwords -> users (id));

allow_tables_to_appear_in_same_query!(transactions, users,);
allow_tables_to_appear_in_same_query!(passwords, users,);