diff --git a/src/otf_api/models/bookings.py b/src/otf_api/models/bookings.py index e670806..4a9cfb6 100644 --- a/src/otf_api/models/bookings.py +++ b/src/otf_api/models/bookings.py @@ -101,10 +101,12 @@ class Booking(OtfItemBase): is_home_studio: bool | None = Field(None, description="Custom helper field to determine if at home studio") def __str__(self) -> str: - class_starts_at_str = self.otf_class.starts_at_local.strftime("%Y-%m-%d %H:%M:%S") + starts_at_str = self.otf_class.starts_at_local.strftime("%a %b %d, %I:%M %p") class_name = self.otf_class.name coach_name = self.otf_class.coach.name - return f"{class_starts_at_str} {class_name} with {coach_name}" + booked_str = self.status.value + + return f"Booking: {starts_at_str} {class_name} - {coach_name} ({booked_str})" class BookingList(OtfItemBase): diff --git a/src/otf_api/models/classes.py b/src/otf_api/models/classes.py index 3ca65d0..5330eed 100644 --- a/src/otf_api/models/classes.py +++ b/src/otf_api/models/classes.py @@ -51,9 +51,18 @@ class OtfClass(OtfItemBase, OtfClassTimeMixin): is_booked: bool | None = Field(None, description="Custom helper field to determine if class is already booked") def __str__(self) -> str: - starts_at_str = self.starts_at_local.strftime("%Y-%m-%d %H:%M:%S") + starts_at_str = self.starts_at_local.strftime("%a %b %d, %I:%M %p") coach_name = self.coach.first_name - return f"{starts_at_str} {self.name} with {coach_name}" + booked_str = "" + if self.is_booked: + booked_str = "Booked" + elif self.has_availability: + booked_str = "Available" + elif self.waitlist_available: + booked_str = "Waitlist Available" + else: + booked_str = "Full" + return f"Class: {starts_at_str} {self.name} - {coach_name} ({booked_str})" @property def has_availability(self) -> bool: