fixed missing mapping in Comic and type in Rooster
(cherry picked from commit 519c359f94b7e901724c851cc55900448f3f74f4)
This commit is contained in:
@@ -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})'
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user