Type the relationships of Pixel
This commit is contained in:
parent
af0e3cf1a1
commit
699e7f0443
1 changed files with 12 additions and 3 deletions
|
|
@ -63,9 +63,18 @@ class Pixel(meta.Base):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Relationships
|
# Relationships
|
||||||
grid = orm.relationship("Grid", back_populates="pixels")
|
grid: orm.Mapped[db.Grid] = orm.relationship(
|
||||||
addresses = orm.relationship("AddressPixelAssociation", back_populates="pixel")
|
"Grid",
|
||||||
forecasts = orm.relationship("Forecast", back_populates="pixel")
|
back_populates="pixels",
|
||||||
|
)
|
||||||
|
addresses: orm.Mapped[list[db.AddressPixelAssociation]] = orm.relationship(
|
||||||
|
"AddressPixelAssociation",
|
||||||
|
back_populates="pixel",
|
||||||
|
)
|
||||||
|
forecasts: orm.Mapped[list[db.Forecast]] = orm.relationship(
|
||||||
|
"Forecast",
|
||||||
|
back_populates="pixel",
|
||||||
|
)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""Non-literal text representation."""
|
"""Non-literal text representation."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue