Design an Event Registration Domain
Manage event publication and attendee registration with deterministic retries, capacity, and transactional consistency.
For this exercise, design an event-management domain in which organizers create draft events with a title, venue, half-open [start, end) schedule, and positive attendee capacity, then publish or cancel them. Registered users may join or cancel their own registration for a published event.
One user may hold at most one active registration per event, and active registrations may never exceed event capacity. Registration and cancellation commands carry caller-supplied request identities: an identical retry returns its stored result, while reusing an identity with different normalized input is rejected.
Concurrent requests for the last available place must produce exactly one committed winner.
Include request/response APIs, an object model, a relational schema with constraints and indexes for event lookup, active registration uniqueness, and idempotency, plus an explicit transaction-boundary walkthrough and deterministic concurrency validation strategy. Complete runnable code and test code are not required.
Exclude payments, seat maps, ticket transfer, notifications, recommendations, multi-region replication, and external calendar synchronization.