summaryrefslogtreecommitdiffstatshomepage
path: root/src/hircine/db/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hircine/db/models.py')
-rw-r--r--src/hircine/db/models.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/hircine/db/models.py b/src/hircine/db/models.py
index 575771b..f204998 100644
--- a/src/hircine/db/models.py
+++ b/src/hircine/db/models.py
@@ -1,6 +1,6 @@
import os
from datetime import date, datetime, timezone
-from typing import List, Optional
+from typing import Optional
from sqlalchemy import (
DateTime,
@@ -104,12 +104,12 @@ class Archive(MixinID, MixinCreatedAt, MixinOrganized, Base):
cover_id: Mapped[int] = mapped_column(ForeignKey("image.id"))
cover: Mapped["Image"] = relationship(lazy="joined", innerjoin=True)
- pages: Mapped[List["Page"]] = relationship(
+ pages: Mapped[list["Page"]] = relationship(
back_populates="archive",
order_by="(Page.index)",
cascade="save-update, merge, expunge, delete, delete-orphan",
)
- comics: Mapped[List["Comic"]] = relationship(
+ comics: Mapped[list["Comic"]] = relationship(
back_populates="archive",
cascade="save-update, merge, expunge, delete, delete-orphan",
)
@@ -176,37 +176,37 @@ class Comic(
archive_id: Mapped[int] = mapped_column(ForeignKey("archive.id"))
archive: Mapped["Archive"] = relationship(back_populates="comics")
- pages: Mapped[List["Page"]] = relationship(order_by="(Page.index)")
+ pages: Mapped[list["Page"]] = relationship(order_by="(Page.index)")
page_count: Mapped[int]
- tags: Mapped[List["ComicTag"]] = relationship(
+ tags: Mapped[list["ComicTag"]] = relationship(
lazy="selectin",
cascade="save-update, merge, expunge, delete, delete-orphan",
passive_deletes=True,
)
- artists: Mapped[List["Artist"]] = relationship(
+ artists: Mapped[list["Artist"]] = relationship(
secondary="comicartist",
lazy="selectin",
order_by="(Artist.name, Artist.id)",
passive_deletes=True,
)
- characters: Mapped[List["Character"]] = relationship(
+ characters: Mapped[list["Character"]] = relationship(
secondary="comiccharacter",
lazy="selectin",
order_by="(Character.name, Character.id)",
passive_deletes=True,
)
- circles: Mapped[List["Circle"]] = relationship(
+ circles: Mapped[list["Circle"]] = relationship(
secondary="comiccircle",
lazy="selectin",
order_by="(Circle.name, Circle.id)",
passive_deletes=True,
)
- worlds: Mapped[List["World"]] = relationship(
+ worlds: Mapped[list["World"]] = relationship(
secondary="comicworld",
lazy="selectin",
order_by="(World.name, World.id)",
@@ -233,7 +233,7 @@ class Comic(
class Tag(MixinID, MixinModifyDates, MixinName, Base):
description: Mapped[Optional[str]]
- namespaces: Mapped[List["Namespace"]] = relationship(
+ namespaces: Mapped[list["Namespace"]] = relationship(
secondary="tagnamespaces",
passive_deletes=True,
order_by="(Namespace.sort_name, Namespace.name, Namespace.id)",