feat: add library icons

This commit is contained in:
2026-08-10 23:58:02 -04:00
parent 0963ee85c2
commit 9fe69641c5
14 changed files with 351 additions and 17 deletions
@@ -17,6 +17,7 @@ class Library(BigIntAuditBase, SlugKey):
# Which structure to save the files in the filesystem (i.e {author_name}/{title}.{ext})
path_template: Mapped[str]
description: Mapped[Optional[str]]
icon: Mapped[str] = mapped_column(default="library")
read_only: Mapped[bool] = mapped_column(nullable=False, default=False)
books: Mapped[list["Book"]] = relationship(back_populates="library")
+3
View File
@@ -8,6 +8,7 @@ class LibraryCreate(BaseModel):
root_path: str
path_template: str | None = "{author}/{title}"
description: str | None = None
icon: str = "library"
read_only: bool = False
@computed_field
@@ -21,6 +22,7 @@ class LibraryRead(BaseModel):
root_path: str
path_template: str
description: str | None
icon: str
read_only: bool
total: int | None = None
@@ -30,4 +32,5 @@ class LibraryUpdate(BaseModel):
root_path: str | None
path_template: str | None
description: str | None
icon: str | None
read_only: bool | None