Type the relationships of AddressPixelAssociation
This commit is contained in:
parent
2e03e58716
commit
de86c2e64d
1 changed files with 9 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
|
||||
from velofy import db
|
||||
from velofy.db import meta
|
||||
|
||||
|
||||
|
|
@ -64,5 +65,11 @@ class AddressPixelAssociation(meta.Base):
|
|||
)
|
||||
|
||||
# Relationships
|
||||
address = orm.relationship("Address", back_populates="pixels")
|
||||
pixel = orm.relationship("Pixel", back_populates="addresses")
|
||||
address: orm.Mapped[db.Address] = orm.relationship(
|
||||
"Address",
|
||||
back_populates="pixels",
|
||||
)
|
||||
pixel: orm.Mapped["db.Pixel"] = orm.relationship(
|
||||
"Pixel",
|
||||
back_populates="addresses",
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue