fixed missing mapping in Comic and type in Rooster

(cherry picked from commit 519c359f94b7e901724c851cc55900448f3f74f4)
This commit is contained in:
Thomas Peetz
2026-01-29 14:56:57 +01:00
parent cf770f4814
commit f525f5d8c4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class Publisher(Base):
parent_publisher_id: Mapped[Optional[str]] = mapped_column(ForeignKey('publisher.id')) parent_publisher_id: Mapped[Optional[str]] = mapped_column(ForeignKey('publisher.id'))
parent_publisher: Mapped[Optional['Publisher']] = relationship(back_populates="imprints", remote_side=[id]) parent_publisher: Mapped[Optional['Publisher']] = relationship(back_populates="imprints", remote_side=[id])
imprints: Mapped[List['Publisher']] = relationship(back_populates="parent_publisher") imprints: Mapped[List['Publisher']] = relationship(back_populates="parent_publisher")
comics = relationship(back_populates="publisher") comics: Mapped[List["Comic"]] = relationship(back_populates="publisher")
def __repr__(self): def __repr__(self):
return f'Publisher({self.id} {self.name})' return f'Publisher({self.id} {self.name})'
+1 -1
View File
@@ -55,7 +55,7 @@ class Rooster(Base, BaseMixin):
__table_args__ = ( __table_args__ = (
UniqueConstraint("year", "team_id", "player_id", "position_id"), UniqueConstraint("year", "team_id", "player_id", "position_id"),
) )
yea: Mapped[int] year: Mapped[int]
team_id: Mapped[str] = mapped_column(ForeignKey("team.id"), nullable=False, index=True) team_id: Mapped[str] = mapped_column(ForeignKey("team.id"), nullable=False, index=True)
team: Mapped[Team] = relationship(back_populates="roosters") team: Mapped[Team] = relationship(back_populates="roosters")
player_id: Mapped[str] = mapped_column(ForeignKey("player.id"), nullable=False, index=True) player_id: Mapped[str] = mapped_column(ForeignKey("player.id"), nullable=False, index=True)