Skip to content

feat: extend bookings module with recurring booking patterns#1138

Merged
yusuftomilola merged 9 commits into
DistinctCodes:mainfrom
wumibals:feat/recurring-bookings
Jun 27, 2026
Merged

feat: extend bookings module with recurring booking patterns#1138
yusuftomilola merged 9 commits into
DistinctCodes:mainfrom
wumibals:feat/recurring-bookings

Conversation

@wumibals

Copy link
Copy Markdown
Contributor

Summary

Extends the bookings module to support recurring booking series without breaking existing functionality.

Changes

  • RecurringRule entity (entities/recurring-rule.entity.ts): new entity with frequency, interval, daysOfWeek, endDate, maxOccurrences, parentBookingId
  • Booking entity: added isRecurring (boolean, default false) and recurringGroupId (UUID, nullable) with index
  • CreateRecurringBookingDto (dto/create-recurring-booking.dto.ts): extends CreateBookingDto with a validated recurringRule object
  • CreateRecurringBookingProvider: generates all instances up to 52 max, checks availability for each date, skips conflicting dates and reports them in the response, links all instances via recurringGroupId
  • CancelRecurringBookingProvider: cancels only future (startDate > today) pending bookings in a group
  • BookingsService: added createRecurring and cancelRecurringGroup delegates
  • BookingsController: added POST /bookings/recurring and DELETE /bookings/recurring/:groupId
  • BookingsModule: registered RecurringRule entity and new providers

Acceptance Criteria Met

  • RecurringRule entity created
  • POST /bookings/recurring generates instances with shared recurringGroupId
  • Availability checked per instance; conflicts skipped and reported
  • Maximum 52 instances per series
  • Cancelling one booking does not affect others
  • DELETE /bookings/recurring/:groupId cancels only future instances
  • Existing POST /bookings flow unchanged

Closes #1082

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@wumibals 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 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like your implementation

@yusuftomilola yusuftomilola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution

@yusuftomilola yusuftomilola merged commit a4e38a5 into DistinctCodes:main Jun 27, 2026
5 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.

[GF-BE-07] Extend bookings module to support recurring booking patterns

2 participants