Type the relationships of Restaurant
This commit is contained in:
parent
5ad3fb538d
commit
76982126f4
1 changed files with 5 additions and 2 deletions
|
|
@ -62,8 +62,11 @@ class Restaurant(meta.Base):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Relationships
|
# Relationships
|
||||||
address = orm.relationship("Address", back_populates="restaurants")
|
address: orm.Mapped[db.Address] = orm.relationship(
|
||||||
orders = orm.relationship(
|
"Address",
|
||||||
|
back_populates="restaurants",
|
||||||
|
)
|
||||||
|
orders: orm.Mapped[list[db.Order]] = orm.relationship(
|
||||||
"Order",
|
"Order",
|
||||||
back_populates="restaurant",
|
back_populates="restaurant",
|
||||||
overlaps="orders_picked_up,pickup_address",
|
overlaps="orders_picked_up,pickup_address",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue