summaryrefslogtreecommitdiffstats
path: root/src/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs34
1 files changed, 34 insertions, 0 deletions
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<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,);