...
This commit is contained in:
30
specs/models_old/library/book.v
Normal file
30
specs/models_old/library/book.v
Normal file
@@ -0,0 +1,30 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// TocEntry represents a table of contents entry for a book
|
||||
pub struct TocEntry {
|
||||
// Title of the chapter/section
|
||||
title string
|
||||
|
||||
// Page number (index in the pages array)
|
||||
page u32
|
||||
|
||||
// Optional subsections
|
||||
subsections []TocEntry
|
||||
}
|
||||
|
||||
// Book represents a Book library item (collection of markdown pages with TOC)
|
||||
pub struct Book {
|
||||
core.Base // Title of the book
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the book
|
||||
description ?string
|
||||
|
||||
// Table of contents
|
||||
table_of_contents []TocEntry
|
||||
|
||||
// Pages content (markdown strings)
|
||||
pages []string
|
||||
}
|
27
specs/models_old/library/collection.v
Normal file
27
specs/models_old/library/collection.v
Normal file
@@ -0,0 +1,27 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// Collection represents a collection of library items
|
||||
pub struct Collection {
|
||||
core.Base // Title of the collection
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the collection
|
||||
description ?string
|
||||
|
||||
// List of image item IDs belonging to this collection
|
||||
images []u32
|
||||
|
||||
// List of PDF item IDs belonging to this collection
|
||||
pdfs []u32
|
||||
|
||||
// List of Markdown item IDs belonging to this collection
|
||||
markdowns []u32
|
||||
|
||||
// List of Book item IDs belonging to this collection
|
||||
books []u32
|
||||
|
||||
// List of Slides item IDs belonging to this collection
|
||||
slides []u32
|
||||
}
|
21
specs/models_old/library/image.v
Normal file
21
specs/models_old/library/image.v
Normal file
@@ -0,0 +1,21 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// Image represents an Image library item
|
||||
pub struct Image {
|
||||
core.Base // Title of the image
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the image
|
||||
description ?string
|
||||
|
||||
// URL of the image
|
||||
url string
|
||||
|
||||
// Width of the image in pixels
|
||||
width u32
|
||||
|
||||
// Height of the image in pixels
|
||||
height u32
|
||||
}
|
15
specs/models_old/library/markdown.v
Normal file
15
specs/models_old/library/markdown.v
Normal file
@@ -0,0 +1,15 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// Markdown represents a Markdown document library item
|
||||
pub struct Markdown {
|
||||
core.Base // Title of the document
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the document
|
||||
description ?string
|
||||
|
||||
// The markdown content
|
||||
content string
|
||||
}
|
18
specs/models_old/library/pdf.v
Normal file
18
specs/models_old/library/pdf.v
Normal file
@@ -0,0 +1,18 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// Pdf represents a PDF document library item
|
||||
pub struct Pdf {
|
||||
core.Base // Title of the PDF
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the PDF
|
||||
description ?string
|
||||
|
||||
// URL of the PDF file
|
||||
url string
|
||||
|
||||
// Number of pages in the PDF
|
||||
page_count u32
|
||||
}
|
27
specs/models_old/library/slideshow.v
Normal file
27
specs/models_old/library/slideshow.v
Normal file
@@ -0,0 +1,27 @@
|
||||
module library
|
||||
|
||||
import freeflowuniverse.herolib.hero.models.core
|
||||
|
||||
// Slide represents a single slide in a slideshow
|
||||
pub struct Slide {
|
||||
// URL of the image for this slide
|
||||
image_url string
|
||||
|
||||
// Optional title for the slide
|
||||
title ?string
|
||||
|
||||
// Optional description for the slide
|
||||
description ?string
|
||||
}
|
||||
|
||||
// Slideshow represents a Slideshow library item (collection of images for slideshow)
|
||||
pub struct Slideshow {
|
||||
core.Base // Title of the slideshow
|
||||
title string @[index]
|
||||
|
||||
// Optional description of the slideshow
|
||||
description ?string
|
||||
|
||||
// List of slides
|
||||
slides []Slide
|
||||
}
|
Reference in New Issue
Block a user