diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2019-03-04 16:27:01 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2019-03-04 16:27:01 +0100 |
commit | e0b02ee68d2b66a9c2fbb58173c74d97fa455b46 (patch) | |
tree | c4d6580ca835b924b69fe241fdf08bc0aa489c41 /src | |
parent | c66b8d799c725a6e66c5f59f66b3c6ae3dd3e8f5 (diff) | |
download | ramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.tar.gz ramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.tar.bz2 ramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.zip |
Add basic db schema.
Diffstat (limited to 'src')
-rw-r--r-- | src/schema.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..88e1e00 --- /dev/null +++ b/src/schema.rs @@ -0,0 +1,31 @@ +table! { + films (id) { + id -> Int4, + title -> Varchar, + url -> Nullable<Varchar>, + } +} + +table! { + rooms (id) { + id -> Int4, + name -> Varchar, + } +} + +table! { + screenings (id) { + id -> Int4, + film_id -> Int4, + room_id -> Int4, + date -> Date, + start_time -> Time, + end_time -> Time, + } +} + +allow_tables_to_appear_in_same_query!( + films, + rooms, + screenings, +); |