feat(bookings): add internal remark field to bookings

Add a remark column to the bookings table for management-only notes.
Include UI to view and edit remarks directly from the bookings list.
Create API endpoint and database queries to support remark updates.
This commit is contained in:
2026-05-04 11:59:41 +08:00
parent 3f7025c8e4
commit 30753fdc61
6 changed files with 256 additions and 2 deletions

View File

@@ -39,6 +39,18 @@ export function parseCreateBookingInput(body: {
}
}
export function parseBookingRemarkInput(body: {
remark?: string | null
}) {
const remark = typeof body.remark === 'string' ? body.remark.trim() : ''
assertBadRequest(remark.length <= 1000, 'Remark must be 1,000 characters or fewer')
return {
remark: remark || null
}
}
export function buildBookingMessage(booking: PublicBooking, confirmationUrl: string) {
return [
`I'd like to book tickets for the ${booking.event.title}.`,