This repository has been archived on 2023-07-04. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-11-23 17:49:31 +01:00
|
|
|
table! {
|
|
|
|
posts (id) {
|
|
|
|
id -> Uuid,
|
|
|
|
section_id -> Uuid,
|
|
|
|
title -> Nullable<Varchar>,
|
|
|
|
publish_date -> Date,
|
|
|
|
content -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
table! {
|
|
|
|
sections (id) {
|
|
|
|
id -> Uuid,
|
|
|
|
title -> Varchar,
|
|
|
|
shortname -> Varchar,
|
|
|
|
description -> Nullable<Text>,
|
|
|
|
is_default -> Bool,
|
|
|
|
has_titles -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
joinable!(posts -> sections (section_id));
|
|
|
|
|
|
|
|
allow_tables_to_appear_in_same_query!(
|
|
|
|
posts,
|
|
|
|
sections,
|
|
|
|
);
|