Type the relationships of Grid
This commit is contained in:
parent
90c0597193
commit
9a2ec3d86b
1 changed files with 8 additions and 2 deletions
|
|
@ -51,8 +51,14 @@ class Grid(meta.Base):
|
|||
)
|
||||
|
||||
# Relationships
|
||||
city = orm.relationship("City", back_populates="grids")
|
||||
pixels = orm.relationship("Pixel", back_populates="grid")
|
||||
city: orm.Mapped[db.City] = orm.relationship(
|
||||
"City",
|
||||
back_populates="grids",
|
||||
)
|
||||
pixels: orm.Mapped[list["db.Pixel"]] = orm.relationship(
|
||||
"Pixel",
|
||||
back_populates="grid",
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""Non-literal text representation."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue