Model/domain/abri/models.py
Daniel Roth 2cfed0c33d Abri amend_job amends an OpenHousing appointment and returns the echoed booking 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 16:15:44 +00:00

50 lines
953 B
Python

from dataclasses import dataclass
from datetime import date
from typing import Literal, NewType, Optional, Union
PlaceRef = NewType("PlaceRef", str)
SlotCode = Literal["AM", "PM", "AD"]
@dataclass(frozen=True)
class LogJobRequest:
client_ref: str
place_ref: PlaceRef
appointment_date: date
appointment_time: SlotCode
short_description: str
long_description: str
@dataclass(frozen=True)
class JobLogged:
job_no: str
logged_info: str
@dataclass(frozen=True)
class AbriRequestRejected:
code: str
message: str
LogJobResult = Union[JobLogged, AbriRequestRejected]
@dataclass(frozen=True)
class AmendJobRequest:
job_no: str
appointment_date: date
appointment_time: SlotCode
resource: Optional[str] = None
@dataclass(frozen=True)
class AppointmentAmended:
job_no: str
appointment_date: str
appointment_time: str
AmendJobResult = Union[AppointmentAmended, AbriRequestRejected]