Event Registrations
Data Entity
Description
Records the sign-up of a user (peer mentor or coordinator) to an event. Each row represents one participant registration, linking a user to an event with status tracking, proxy attribution, and attendance confirmation. Supports self-registration, coordinator proxy registration, and cancellation workflows.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Unique identifier for the registration record | PKrequiredunique |
event_id |
uuid |
Foreign key referencing the event being registered for | required |
user_id |
uuid |
Foreign key referencing the user who is registered as participant | required |
registered_by_user_id |
uuid |
Foreign key referencing the user who performed the registration action. Equals user_id for self-registration; differs when a coordinator registers on behalf of another user. | required |
organization_id |
uuid |
Foreign key referencing the organization context for multi-tenant isolation | required |
status |
enum |
Current registration status | required |
registration_type |
enum |
Whether the user registered themselves or was registered by a coordinator as proxy | required |
notes |
text |
Optional free-text notes provided at registration time, e.g. dietary needs or accessibility requirements | - |
attended_at |
datetime |
Timestamp when attendance was confirmed, null if not yet confirmed | - |
cancelled_at |
datetime |
Timestamp when the registration was cancelled, null if still active | - |
cancellation_reason |
text |
Optional reason provided when cancelling the registration | - |
waitlist_position |
integer |
Position in the waitlist queue when status is waitlisted, null otherwise | - |
created_at |
datetime |
Timestamp when the registration was created | required |
updated_at |
datetime |
Timestamp of the last modification to this registration record | required |
Database Indexes
idx_event_registrations_event_id
Columns: event_id
idx_event_registrations_user_id
Columns: user_id
idx_event_registrations_event_user
Columns: event_id, user_id
idx_event_registrations_organization_id
Columns: organization_id
idx_event_registrations_status
Columns: status
idx_event_registrations_created_at
Columns: created_at
idx_event_registrations_registered_by
Columns: registered_by_user_id
Validation Rules
valid_event_reference
error
Validation failed
valid_user_reference
error
Validation failed
valid_registered_by_reference
error
Validation failed
valid_status_transition
error
Validation failed
cancellation_fields_consistency
error
Validation failed
attendance_fields_consistency
error
Validation failed
notes_length_check
error
Validation failed
cancellation_reason_length_check
error
Validation failed
waitlist_position_positive
error
Validation failed
proxy_type_consistency
error
Validation failed
Business Rules
no_duplicate_registration
A user can only have one active (non-cancelled) registration per event. The unique index on (event_id, user_id) enforces this at the database level; cancelled registrations must be soft-deleted or status-checked before re-registration.
capacity_enforcement
When an event reaches its maximum participant capacity, new registrations must be placed on the waitlist (status: waitlisted) rather than registered. Waitlist position is assigned sequentially.
waitlist_promotion
When a registered participant cancels and the event has waitlisted users, the first waitlisted user (lowest waitlist_position) is automatically promoted to registered status and notified.
proxy_registration_authorization
Proxy registrations (registration_type: proxy) are only permitted when the registering user (registered_by_user_id) holds a Coordinator or Org Admin role and the target user belongs to the coordinator's local association scope.
organization_scope_enforcement
A user can only register for events belonging to their own organization. The organization_id on the registration must match the event's organization_id and the user's organization context.
cancellation_before_event
Registrations can only be cancelled before the event start time. Cancellation after the event has begun is not permitted; the status should transition to attended or no_show instead.
attendance_after_event_start
Attendance confirmation (attended_at timestamp and status: attended) can only be set after the event's scheduled start time.
registration_counts_for_reporting
Active registrations (status: registered or attended) are counted toward Bufdir reporting metrics and KPI aggregation. Cancelled and no_show registrations are excluded from participant counts but retained for audit purposes.