This repository has been archived on 2023-07-04. You can view files and clone it, but cannot push or open issues/pull-requests.
blog/src/schema.rs

42 lines
771 B
Rust
Raw Normal View History

2021-11-23 17:49:31 +01:00
table! {
posts (id) {
id -> Uuid,
section_id -> Uuid,
is_private -> Bool,
is_archived -> Bool,
2021-11-23 17:49:31 +01:00
}
}
table! {
sections (id) {
id -> Uuid,
title -> Varchar,
shortname -> Varchar,
description -> Text,
2021-11-23 17:49:31 +01:00
is_default -> Bool,
has_titles -> Bool,
is_private -> Bool,
is_archived -> Bool,
2021-12-23 23:28:26 +01:00
}
}
table! {
versions (id) {
id -> Uuid,
post_id -> Uuid,
title -> Nullable<Varchar>,
publish_date -> Nullable<Date>,
content -> Text,
is_draft -> Bool,
2021-11-23 17:49:31 +01:00
}
}
joinable!(posts -> sections (section_id));
joinable!(versions -> posts (post_id));
2021-11-23 17:49:31 +01:00
allow_tables_to_appear_in_same_query!(
posts,
sections,
versions,
2021-11-23 17:49:31 +01:00
);