Event Registration
Data Entity
Description
Records a peer mentor's sign-up for an event, tracking registration status, attendance confirmation, and withdrawal. Links users to events and supports coordinator oversight of event participation.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Primary key | PKrequiredunique |
event_id |
uuid |
Foreign key to the event being registered for | required |
user_id |
uuid |
Foreign key to the peer mentor registering | required |
status |
enum |
Current registration status | required |
registered_at |
datetime |
Timestamp when the registration was created | required |
cancelled_at |
datetime |
Timestamp when the registration was cancelled, if applicable | - |
attended_at |
datetime |
Timestamp when attendance was confirmed | - |
registered_by_user_id |
uuid |
User who created this registration (may differ from user_id if a coordinator registered on behalf of the peer mentor) | - |
is_proxy_registration |
boolean |
True when a coordinator registered on behalf of a peer mentor | required |
notes |
text |
Optional coordinator or system notes on this registration | - |
organization_id |
uuid |
Organization context for tenant isolation | required |
created_at |
datetime |
Record creation timestamp | required |
updated_at |
datetime |
Record last-update timestamp | required |
Database Indexes
idx_event_registrations_event_id
Columns: event_id
idx_event_registrations_user_id
Columns: user_id
idx_event_registrations_unique_user_event
Columns: event_id, user_id
idx_event_registrations_organization_id
Columns: organization_id
idx_event_registrations_status
Columns: event_id, status
Validation Rules
event_id_required
error
Validation failed
user_id_required
error
Validation failed
valid_status_transition
error
Validation failed
event_not_past
error
Validation failed
Business Rules
no_duplicate_registration
A user may not register for the same event more than once. Attempting to register again returns the existing record or an error.
capacity_check
If the event has a max_capacity, registrations beyond the limit are placed on the waitlist rather than rejected outright.
proxy_requires_coordinator_role
Setting is_proxy_registration=true is only permitted when the acting user holds the Coordinator role for the same organization.
cancellation_sets_timestamp
When status transitions to 'cancelled', cancelled_at is automatically set to the current timestamp.
attendance_sets_timestamp
When status transitions to 'attended', attended_at is automatically set to the current timestamp.
tenant_isolation
organization_id must match the event's organization_id. Cross-tenant registrations are rejected.