Type the relationships of Courier

This commit is contained in:
Alexander Hess 2026-12-01 11:13:15 +01:00
commit 99c8c2ac2e
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -6,6 +6,7 @@ import sqlalchemy as sa
from sqlalchemy import orm from sqlalchemy import orm
from sqlalchemy.dialects import postgresql as psql from sqlalchemy.dialects import postgresql as psql
from velofy import db
from velofy.db import meta from velofy.db import meta
@ -68,7 +69,10 @@ class Courier(meta.Base):
) )
# Relationships # Relationships
orders = orm.relationship("Order", back_populates="courier") orders: orm.Mapped[list["db.Order"]] = orm.relationship(
"Order",
back_populates="courier",
)
def __repr__(self) -> str: def __repr__(self) -> str:
"""Non-literal text representation.""" """Non-literal text representation."""