core PK: id 7 required 1 unique

Description

Roster record linking a user to a specific workshop session, tracking enrollment and attendance status for Blindeforbundet's mentor-program career workshops.

10
Attributes
4
Indexes
4
Validation Rules
9
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
workshop_id uuid Foreign key to workshops table
required
user_id uuid Foreign key to users table — the peer mentor enrolled in the workshop
required
organization_id uuid Tenant scope — must match the workshop's organization_id for isolation
required
status enum Enrollment/attendance status of the participant
required
enrolled_at datetime Timestamp when the participant was added to the workshop roster
required
attended_at datetime Timestamp when attendance was confirmed; NULL until marked attended
-
added_by_user_id uuid User ID of the coordinator who added this participant to the roster
-
notes text Optional coordinator notes about this participant's involvement or follow-up actions
-
updated_at datetime Last modification timestamp
required

Database Indexes

idx_workshop_participants_workshop_id
btree

Columns: workshop_id

idx_workshop_participants_user_id
btree

Columns: user_id

idx_workshop_participants_unique_enrollment
btree unique

Columns: workshop_id, user_id

idx_workshop_participants_org_status
btree

Columns: organization_id, status

Validation Rules

user_must_exist_in_organization error

Validation failed

workshop_must_be_active error

Validation failed

status_transition_guard error

Validation failed

notes_length_limit error

Validation failed

Business Rules

unique_enrollment_per_workshop
on_create

A user may only appear once on a given workshop's roster — duplicate enrollments are rejected

organization_scope_match
on_create

The participant's organization_id must match the workshop's organization_id; cross-org enrollment is forbidden

coordinator_only_roster_management
on_create

Only users with Coordinator or Org Admin role may add or remove participants from a workshop roster

attended_at_requires_attended_status
on_update

attended_at timestamp may only be set when status is 'attended'; setting attended_at auto-promotes status to 'attended'

cancelled_participant_excluded_from_counts
always

Participants with status 'cancelled' are excluded from workshop capacity counts and Bufdir-relevant attendance aggregates

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage