From e6468b012d5b33dd16992652da57f11dd5a6e82f Mon Sep 17 00:00:00 2001 From: Jokler Date: Sun, 21 Jun 2020 06:37:46 +0200 Subject: Initial commit --- src/schema.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/schema.rs (limited to 'src/schema.rs') diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..2855927 --- /dev/null +++ b/src/schema.rs @@ -0,0 +1,34 @@ +table! { + transactions (id) { + id -> Unsigned, + date -> Timestamp, + sender -> Unsigned, + receiver -> Unsigned, + amount -> Unsigned, + sender_balance -> Unsigned, + receiver_balance -> Unsigned, + purpose -> Varchar, + } +} + +table! { + passwords (id) { + id -> Unsigned, + hash -> Char, + } +} + +table! { + users (id) { + id -> Unsigned, + power_level -> Integer, + name -> Varchar, + created -> Timestamp, + balance -> Unsigned, + } +} + +joinable!(passwords -> users (id)); + +allow_tables_to_appear_in_same_query!(transactions, users,); +allow_tables_to_appear_in_same_query!(passwords, users,); -- cgit v1.2.3-70-g09d2