Add ticket +/- quantity support to shared contracts and services

- Add ticket_type_id field to TicketDTO for grouping
- Add adjust_ticket_quantity to CalendarService protocol + SQL impl
- Add stub for adjust_ticket_quantity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-21 08:53:04 +00:00
parent e83df2f742
commit 1f8fb521b2
4 changed files with 69 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ class TicketDTO:
created_at: datetime | None = None
checked_in_at: datetime | None = None
entry_id: int | None = None
ticket_type_id: int | None = None
price: Decimal | None = None
order_id: int | None = None
calendar_container_id: int | None = None

View File

@@ -112,6 +112,12 @@ class CalendarService(Protocol):
self, session: AsyncSession, user_id: int, session_id: str,
) -> None: ...
async def adjust_ticket_quantity(
self, session: AsyncSession, entry_id: int, count: int, *,
user_id: int | None, session_id: str | None,
ticket_type_id: int | None = None,
) -> int: ...
async def entry_ids_for_content(
self, session: AsyncSession, content_type: str, content_id: int,
) -> set[int]: ...