more docs!

This commit is contained in:
Hamcha 2023-07-21 16:01:51 +02:00
parent bac09e5778
commit 4f6deaa70b
Signed by: hamcha
GPG key ID: 1669C533B8CF6D89
2 changed files with 11 additions and 0 deletions

View file

@ -28,9 +28,16 @@ pub struct Collection {
#[derive(Debug, Serialize, ToSchema)]
pub struct CollectionData {
/// Collection ID
pub id: Uuid,
/// Site ID
pub slug: String,
/// Collection URL name
pub name: String,
/// Collection parent (eg. blog categories have blog as parent)
pub parent: Option<Uuid>,
}

View file

@ -9,6 +9,7 @@ use crate::cursor::{AsCursor, CursorList};
use super::Error;
/// Post as stored in repository
#[derive(Deserialize, Serialize, FromRow)]
pub struct Post {
/// Post ID
@ -47,9 +48,11 @@ pub struct Post {
pub deleted_at: Option<NaiveDateTime>,
}
/// A single block in a post
#[derive(Deserialize, Serialize, Debug, ToSchema)]
#[serde(tag = "kind")]
pub enum PostBlock {
/// Markdown-formatted text
MarkupV1 {
/// Markup format (markdown, html, plain)
format: String,
@ -57,6 +60,7 @@ pub enum PostBlock {
/// Markup content (before rendering)
content: String,
},
/// Image gallery
GalleryV1 {
/// Images in the gallery
images: Vec<ImageElement>,