more docs!
This commit is contained in:
parent
bac09e5778
commit
4f6deaa70b
2 changed files with 11 additions and 0 deletions
|
@ -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>,
|
||||
}
|
||||
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue