Skip to content

fix(workspace_booking): address type safety and error coverage gaps#639

Merged
yusuftomilola merged 1 commit intoDistinctCodes:mainfrom
Kaylahray:type-safety
Mar 9, 2026
Merged

fix(workspace_booking): address type safety and error coverage gaps#639
yusuftomilola merged 1 commit intoDistinctCodes:mainfrom
Kaylahray:type-safety

Conversation

@Kaylahray
Copy link
Contributor

fix(workspace_booking): address type safety and error coverage gaps

  • Change hourly_rate and amount_paid from i128 to u128
  • Add NoShow and Expired variants to BookingStatus
  • Add Virtual and Hybrid variants to WorkspaceType
  • Replace is_available bool with WorkspaceAvailability enum (carries UnavailabilityReason)
  • Add MAX_ID_LEN and MAX_NAME_LEN constants; document length constraints on id and name fields
  • Add cancelled_at and completed_at timestamps to Booking
  • Add BookingExpired, InsufficientBalance, BookingAlreadyCancelled, BookingAlreadyCompleted, and WorkspaceHasActiveBookings error variants
  • Introduce reserved error code ranges (core 1–99, booking 100–199, workspace 200–299)

Closes #614

@vercel
Copy link

vercel bot commented Mar 8, 2026

@Kaylahray is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola yusuftomilola merged commit e63400e into DistinctCodes:main Mar 9, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Type Safety, Error Coverage, and Extensibility in Workspace Booking Contract

2 participants