|
|
@@ -0,0 +1,76 @@ |
|
|
|
// @generated automatically by Diesel CLI. |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
comment_votes (id) { |
|
|
|
id -> Int8, |
|
|
|
positive -> Nullable<Bool>, |
|
|
|
comment_id -> Int8, |
|
|
|
user_id -> Int8, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
comments (id) { |
|
|
|
id -> Int8, |
|
|
|
content -> Text, |
|
|
|
parent -> Nullable<Int8>, |
|
|
|
telegram_handle -> Text, |
|
|
|
issue_id -> Int4, |
|
|
|
created_at -> Nullable<Timestamp>, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
issue_votes (id) { |
|
|
|
id -> Int8, |
|
|
|
positive -> Nullable<Bool>, |
|
|
|
issue_id -> Int4, |
|
|
|
user_id -> Int8, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
issues (id) { |
|
|
|
id -> Int4, |
|
|
|
title -> Text, |
|
|
|
paragraph_count -> Nullable<Int2>, |
|
|
|
telegram_handle -> Text, |
|
|
|
created_at -> Nullable<Timestamp>, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
paragraphs (id) { |
|
|
|
id -> Int8, |
|
|
|
content -> Text, |
|
|
|
index -> Int4, |
|
|
|
post_id -> Int4, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::table! { |
|
|
|
sessions (id) { |
|
|
|
id -> Int8, |
|
|
|
session_id -> Text, |
|
|
|
user_id -> Int8, |
|
|
|
auth_date -> Nullable<Int8>, |
|
|
|
username -> Nullable<Text>, |
|
|
|
first_name -> Nullable<Text>, |
|
|
|
last_name -> Nullable<Text>, |
|
|
|
photo_url -> Nullable<Text>, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
diesel::joinable!(comment_votes -> comments (comment_id)); |
|
|
|
diesel::joinable!(comments -> issues (issue_id)); |
|
|
|
diesel::joinable!(issue_votes -> issues (issue_id)); |
|
|
|
diesel::joinable!(paragraphs -> issues (post_id)); |
|
|
|
|
|
|
|
diesel::allow_tables_to_appear_in_same_query!( |
|
|
|
comment_votes, |
|
|
|
comments, |
|
|
|
issue_votes, |
|
|
|
issues, |
|
|
|
paragraphs, |
|
|
|
sessions, |
|
|
|
); |