This repository has been archived on 2021-10-25. You can view files and clone it, but cannot push or open issues/pull-requests.
rusty-bever/src/schema.rs

44 lines
855 B
Rust
Raw Normal View History

table! {
posts (id) {
id -> Uuid,
section_id -> Uuid,
title -> Nullable<Varchar>,
publish_date -> Date,
content -> Text,
}
}
2021-08-20 16:52:58 +02:00
table! {
refresh_tokens (token) {
token -> Bytea,
user_id -> Uuid,
expires_at -> Timestamp,
last_used_at -> Nullable<Timestamp>,
}
}
table! {
sections (id) {
id -> Uuid,
title -> Varchar,
description -> Nullable<Text>,
is_default -> Bool,
has_titles -> Bool,
}
}
2021-08-20 16:52:58 +02:00
table! {
users (id) {
id -> Uuid,
username -> Varchar,
password -> Text,
blocked -> Bool,
2021-08-20 22:25:21 +02:00
admin -> Bool,
2021-08-20 16:52:58 +02:00
}
}
joinable!(posts -> sections (section_id));
2021-08-20 16:52:58 +02:00
joinable!(refresh_tokens -> users (user_id));
2021-09-13 22:15:38 +02:00
allow_tables_to_appear_in_same_query!(posts, refresh_tokens, sections, users,);