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
|
||||
address = orm.relationship("Address", back_populates="restaurants")
|
||||
orders = orm.relationship(
|
||||
address: orm.Mapped[db.Address] = orm.relationship(
|
||||
"Address",
|
||||
back_populates="restaurants",
|
||||
)
|
||||
orders: orm.Mapped[list[db.Order]] = orm.relationship(
|
||||
"Order",
|
||||
back_populates="restaurant",
|
||||
overlaps="orders_picked_up,pickup_address",
|
||||
|
|
|
|||
Loading…
Reference in a new issue