Event Registration
Data Entity
Description
Records a contact's registration for an event, tracking who registered them, their attendance status, and any cancellation details. Serves as the join table between events and contacts with additional registration metadata.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Primary key — unique registration record identifier | PKrequiredunique |
event_id |
uuid |
Foreign key referencing the event this registration belongs to | required |
contact_id |
uuid |
Foreign key referencing the contact who is registered for the event | required |
registered_by_user_id |
uuid |
Foreign key referencing the user (peer mentor or coordinator) who performed the registration action. May differ from the contact's assigned peer mentor if a coordinator registered on their behalf. | required |
organization_id |
uuid |
Foreign key to the organization — enforces tenant isolation. Denormalized for query performance on multi-tenant reads. | required |
status |
enum |
Current status of the registration in its lifecycle | required |
registration_type |
enum |
How the registration was created — self-registration, proxy registration by a coordinator, or bulk registration | required |
notes |
text |
Optional free-text notes added at registration time, e.g. accessibility requirements, dietary needs, or coordinator remarks | - |
cancelled_at |
datetime |
Timestamp when the registration was cancelled. Null if not cancelled. | - |
cancellation_reason |
text |
Optional reason provided when cancelling. Helps coordinators track patterns. | - |
checked_in_at |
datetime |
Timestamp when the contact was marked as attended/checked in. Null until attendance is confirmed. | - |
waitlist_position |
integer |
Position in the waitlist if status is 'waitlisted'. Null for non-waitlisted registrations. | - |
created_at |
datetime |
Timestamp when the registration record was created | required |
updated_at |
datetime |
Timestamp of the last modification to this record | required |
Database Indexes
idx_event_registrations_event_contact
Columns: event_id, contact_id
idx_event_registrations_event_id
Columns: event_id
idx_event_registrations_contact_id
Columns: contact_id
idx_event_registrations_organization_id
Columns: organization_id
idx_event_registrations_status
Columns: status
idx_event_registrations_registered_by
Columns: registered_by_user_id
idx_event_registrations_created_at
Columns: created_at
Validation Rules
event_id_exists
error
Validation failed
contact_id_exists
error
Validation failed
valid_status_transition
error
Validation failed
cancellation_reason_on_late_cancel
error
Validation failed
notes_max_length
error
Validation failed
waitlist_position_consistency
error
Validation failed
checked_in_at_requires_registered_status
error
Validation failed
Business Rules
no_duplicate_registration
A contact may not be registered for the same event more than once. The unique index on (event_id, contact_id) enforces this at the database level; the service layer returns a user-friendly error before attempting insert.
org_tenant_isolation
A contact may only be registered for events belonging to the same organization. The backend validates organization_id matches between the event and the contact before creating the record.
event_must_be_open
Registrations can only be created for events with status 'published' or 'open'. Attempting to register for a cancelled, completed, or draft event returns an error.
capacity_check_and_waitlist
If the event has a max_participants limit and that limit is reached, new registrations are automatically assigned status 'waitlisted' with an incremented waitlist_position rather than being rejected.
cancellation_deadline
Cancellations by peer mentors are only permitted up to the event's configured cancellation_deadline. After that, only a coordinator may cancel a registration. The system records who performed the cancellation via registered_by_user_id on the updated record.
waitlist_promotion
When a registration is cancelled, the next waitlisted contact (lowest waitlist_position) is automatically promoted to 'registered' status and a push notification is dispatched.
proxy_requires_coordinator_role
A registration with registration_type 'proxy' or 'bulk' may only be created by a user holding the Coordinator role within the same organization. The RBAC service enforces this before the service layer proceeds.
attendance_only_on_event_day
The checked_in_at timestamp and status transition to 'attended' or 'no_show' may only be set on or after the event's scheduled start date. This prevents premature attendance confirmation.