core PK: id 9 required 2 unique

Description

Represents a career workshop or mentor-led group session managed by Blindeforbundet coordinators. Supports two-day group guidance sessions with notes, participant lists, and to-do checklists.

16
Attributes
5
Indexes
5
Validation Rules
11
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
organization_id uuid Organization that owns this workshop
required
created_by_user_id uuid Coordinator who created the workshop
required
title string Workshop title or name
required
description text Detailed description of workshop purpose, agenda, or content
-
status enum Lifecycle state of the workshop
required
workshop_type enum Type of workshop session
required
scheduled_start_at datetime Planned start date and time of the workshop
-
scheduled_end_at datetime Planned end date and time of the workshop
-
location string Physical or virtual location of the workshop
-
max_participants integer Maximum number of participants allowed. Null means unlimited.
-
notes text Coordinator notes scoped to this workshop (separate from workshop_notes child records)
-
deep_link_token string Unique token used to generate deep links for sharing/joining this workshop
unique
is_archived boolean Soft-archive flag; archived workshops are hidden from active lists but retained for reporting
required
created_at datetime Record creation timestamp
required
updated_at datetime Last modification timestamp
required

Database Indexes

idx_workshops_organization_id
btree

Columns: organization_id

idx_workshops_created_by_user_id
btree

Columns: created_by_user_id

idx_workshops_organization_status
btree

Columns: organization_id, status

idx_workshops_scheduled_start_at
btree

Columns: scheduled_start_at

idx_workshops_deep_link_token
btree unique

Columns: deep_link_token

Validation Rules

title_required error

Validation failed

end_after_start error

Validation failed

max_participants_positive error

Validation failed

unique_deep_link_token error

Validation failed

organization_exists error

Validation failed

Business Rules

coordinator_scope_only
on_create

Only users with Coordinator or Organization Admin role may create, update, or delete workshops. Peer Mentors have read-only access to workshops they are participating in.

organization_isolation
always

A workshop belongs to exactly one organization. Users from a different organization must never see or modify this workshop.

max_participants_enforcement
on_create

When max_participants is set, adding a participant beyond the cap must be rejected. Coordinators may override the cap explicitly.

status_transition_guard
on_update

Status transitions must follow the allowed path: draft → scheduled → in_progress → completed|cancelled. Reversing from completed or cancelled is not permitted.

Enforced by: Workshop Service
module_toggle_gate
always

The mentor-program module must be enabled for the organization before any workshop operations are permitted.

cascade_archive
on_update

Archiving a workshop (is_archived = true) also hides its participants and todos from active lists, but the child records are retained.

Enforced by: Workshop Service

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage