core PK: id 15 required 1 unique

Description

A scheduled mentor program session (career workshop or group guidance session) organized by an organization, tracking participants, notes, todos, schedule, and facilitator details.

24
Attributes
5
Indexes
8
Validation Rules
14
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
organization_id uuid FK to organizations — the tenant that owns this workshop session
required
title string Display title for the workshop session
required
description text Detailed description of the session purpose, agenda, or content
-
session_type enum Type of workshop session
required
status enum Lifecycle status of the session
required
scheduled_start_at datetime Planned start date and time (UTC)
required
scheduled_end_at datetime Planned end date and time (UTC)
required
actual_start_at datetime Actual start time when session was marked in_progress
-
actual_end_at datetime Actual end time when session was marked completed
-
location string Physical or virtual location of the session
-
is_virtual boolean Whether the session is held virtually (video call, etc.)
required
virtual_meeting_url string Meeting link for virtual sessions
-
facilitator_user_id uuid FK to users — the coordinator or peer mentor facilitating the session
-
max_participants integer Maximum number of participants allowed; null means unlimited
-
participant_count integer Denormalized count of confirmed participants (updated on participant changes)
required
duration_days integer Number of days the workshop spans (Blindeforbundet career workshops run over two days)
required
notes_count integer Denormalized count of notes attached to this session
required
todos_count integer Denormalized count of to-do items for this session
required
cancellation_reason text Free-text reason when status is set to cancelled
-
metadata json Extensible org-specific metadata (e.g. HLF certification tags, Blindeforbundet mentee group IDs)
-
created_by_user_id uuid FK to users — who created this session record
required
created_at datetime Record creation timestamp (UTC)
required
updated_at datetime Last update timestamp (UTC)
required

Database Indexes

idx_workshop_sessions_organization_id
btree

Columns: organization_id

idx_workshop_sessions_scheduled_start_at
btree

Columns: scheduled_start_at

idx_workshop_sessions_organization_status
btree

Columns: organization_id, status

idx_workshop_sessions_facilitator_user_id
btree

Columns: facilitator_user_id

idx_workshop_sessions_organization_start
btree

Columns: organization_id, scheduled_start_at

Validation Rules

end_after_start error

Validation failed

title_not_empty error

Validation failed

duration_days_positive error

Validation failed

valid_session_type error

Validation failed

valid_status_transition error

Validation failed

cancellation_reason_required error

Validation failed

virtual_url_format error

Validation failed

organization_exists error

Validation failed

Business Rules

mentor_program_module_required
always

Workshop sessions can only be created and accessed when the mentor-program module toggle is enabled for the organization. Disabled orgs receive 403 on all workshop endpoints.

max_participants_cap
on_create

If max_participants is set, new participant registrations must be rejected once participant_count reaches max_participants.

completed_session_immutable
on_update

Once status is 'completed', core scheduling fields (scheduled_start_at, scheduled_end_at, organization_id) may not be modified. Notes and to-dos remain editable.

Enforced by: WorkshopService
cancelled_session_no_new_participants
on_create

Participants cannot be added to a cancelled session.

facilitator_must_belong_to_organization
on_create

If facilitator_user_id is set, the referenced user must be a member of the same organization_id as the session.

Enforced by: WorkshopService
virtual_session_url_consistency
on_update

If is_virtual is true and status transitions to scheduled or in_progress, a virtual_meeting_url should be present (warning if absent).

participant_count_sync
always

participant_count must stay in sync with the actual row count in workshop_participants. Updated transactionally whenever participants are added or removed.

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage