feat(bookings): session-to-session move for class bookings

Class customers can move a booking to another future session of the
same template from the manage page. Full target sessions place the
booking on the waitlist; freeing a confirmed seat drains the old
session's queue via the existing promotion path. Reminders re-arm
for the new time.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-18 15:42:04 +02:00
1 parent 6c3b2bf6bf
commit e5cb9bd543
10 files changed
+927 -10

No files matched your search

+23
View File
@@ -512,6 +512,29 @@ type RescheduleBookingRequest struct {
Reason string `json:"reason,omitempty"`
}
// SessionMoveTarget is an upcoming session of the same class template a
// customer can move their booking to. Remaining is the free confirmed seats;
// negative means a queue would form.
type SessionMoveTarget struct {
SessionID string `json:"sessionId"`
Title string `json:"title"`
StartsAt time.Time `json:"startsAt"`
EndsAt time.Time `json:"endsAt"`
Location string `json:"location,omitempty"`
Capacity int32 `json:"capacity"`
ConfirmedCount int `json:"confirmedCount"`
WaitlistCount int `json:"waitlistCount"`
Remaining int `json:"remaining"`
}
type MoveBookingRequest struct {
ClassSessionID string `json:"classSessionId" binding:"required"`
}
type MoveBookingResponse struct {
Status string `json:"status"` // confirmed | waitlisted
}
type CancelBookingRequest struct {
Reason string `json:"reason,omitempty"`
}