Design Booking Comments and Administrative Updates
Model booking comments, author ownership, privileged edits, bulk administration, and auditable outcomes.
For this exercise, assume a booking comment service used by travellers and administrators. The core journey is to add a comment to a booking, let an administrator update one comment, and apply one reviewed bulk update across selected comments.
The following practice constraints complete the reported seed: comments have stable identities, retain author plus timestamps, and carry a version; comment text must remain nonempty after trimming; administrator edits supply the expected version; ordinary users may create but not edit existing comments; bulk updates validate the complete selection before applying; deletion and rich text are outside scope.
Design the object model, responsibilities, focused contracts, state transitions, and important errors. Protect this invariant: every stored comment belongs to one booking and only an authorized principal may mutate it.
Explain how the design reports unknown booking or comment, unauthorized actor, invalid text, and partially invalid bulk selection. Do not implement code; produce a coherent design that can be tested and extended.