Created genre table and added links and endpoints for it.

This commit is contained in:
2025-06-25 14:50:28 +03:00
parent 83dbb1824e
commit 9604771439
9 changed files with 158 additions and 19 deletions

View File

@@ -9,6 +9,6 @@ if TYPE_CHECKING:
class Genre(GenreBase, table=True):
id: Optional[int] = Field(default=None, primary_key=True, index=True)
books: List["Book"] = Relationship(
back_populates="authors",
back_populates="genres",
link_model=GenreBookLink
)