Type the relationships of Customer
This commit is contained in:
parent
99c8c2ac2e
commit
bda9cf69ed
1 changed files with 4 additions and 1 deletions
|
|
@ -26,7 +26,10 @@ class Customer(meta.Base):
|
||||||
return f"<{self.__class__.__name__}(#{self.id})>"
|
return f"<{self.__class__.__name__}(#{self.id})>"
|
||||||
|
|
||||||
# Relationships
|
# Relationships
|
||||||
orders = orm.relationship("Order", back_populates="customer")
|
orders: orm.Mapped[list["db.Order"]] = orm.relationship(
|
||||||
|
"Order",
|
||||||
|
back_populates="customer",
|
||||||
|
)
|
||||||
|
|
||||||
def clear_map(self) -> "Customer": # pragma: no cover
|
def clear_map(self) -> "Customer": # pragma: no cover
|
||||||
"""Shortcut to the `...city.clear_map()` method.
|
"""Shortcut to the `...city.clear_map()` method.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue