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
|
import sqlalchemy as sa
|
||||||
from sqlalchemy import orm
|
from sqlalchemy import orm
|
||||||
|
|
||||||
|
from velofy import db
|
||||||
from velofy.db import meta
|
from velofy.db import meta
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,5 +65,11 @@ class AddressPixelAssociation(meta.Base):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Relationships
|
# Relationships
|
||||||
address = orm.relationship("Address", back_populates="pixels")
|
address: orm.Mapped[db.Address] = orm.relationship(
|
||||||
pixel = orm.relationship("Pixel", back_populates="addresses")
|
"Address",
|
||||||
|
back_populates="pixels",
|
||||||
|
)
|
||||||
|
pixel: orm.Mapped["db.Pixel"] = orm.relationship(
|
||||||
|
"Pixel",
|
||||||
|
back_populates="addresses",
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue