From e0b02ee68d2b66a9c2fbb58173c74d97fa455b46 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 4 Mar 2019 16:27:01 +0100 Subject: Add basic db schema. --- src/schema.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/schema.rs (limited to 'src') 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, + } +} + +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, +); -- cgit v1.2.3