core PK: id 9 required 1 unique

Description

Structured notes created by coordinators or facilitators during or after mentor program career workshops, capturing key discussion points, action items, and session summaries for group mentoring sessions.

11
Attributes
4
Indexes
6
Validation Rules
9
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key for the workshop note record
PKrequiredunique
workshop_id uuid Foreign key referencing the mentor_workshops table this note belongs to
required
author_id uuid Foreign key referencing the user who created this note (coordinator or facilitator)
required
title string Brief title or heading for the note
-
content text Full text content of the workshop note, supporting rich plain text
required
note_type enum Categorizes the type of note for filtering and display
required
visibility enum Controls who can view the note within the organization
required
is_pinned boolean Whether the note is pinned to the top of the workshop notes list
required
created_at datetime Timestamp when the note was created
required
updated_at datetime Timestamp when the note was last modified
required
deleted_at datetime Soft delete timestamp; null means the note is active
-

Database Indexes

idx_workshop_notes_workshop_id
btree

Columns: workshop_id

idx_workshop_notes_author_id
btree

Columns: author_id

idx_workshop_notes_workshop_created
btree

Columns: workshop_id, created_at

idx_workshop_notes_deleted_at
btree

Columns: deleted_at

Validation Rules

content_not_empty error

Validation failed

title_max_length error

Validation failed

valid_note_type error

Validation failed

valid_visibility error

Validation failed

workshop_id_exists error

Validation failed

author_id_exists error

Validation failed

Business Rules

author_must_be_coordinator_or_facilitator
on_create

Only users with Coordinator or Organization Admin roles may create or edit workshop notes; Peer Mentors cannot author notes

Enforced by: WorkshopNoteService
note_belongs_to_valid_workshop
on_create

A workshop note must reference a workshop that exists and belongs to the same organization as the author

Enforced by: WorkshopNoteService
soft_delete_only
on_delete

Workshop notes are never hard-deleted; deleted_at is set instead to preserve audit history

Enforced by: WorkshopNoteService
visibility_scoping
always

Notes with visibility 'private' are only readable by their author; 'coordinators_only' by all coordinators in the organization; 'all_participants' by all workshop participants

updated_at_auto_refresh
on_update

updated_at is automatically set to the current timestamp on every update operation

Enforced by: WorkshopNoteService

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage