core PK: id 9 required 1 unique

Description

Lightweight task checklist items attached to a workshop, enabling coordinators to track preparation and follow-up tasks for mentor program career workshops.

13
Attributes
5
Indexes
5
Validation Rules
10
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
workshop_id uuid Foreign key to workshops table — the workshop this todo belongs to
required
created_by_user_id uuid Foreign key to users — coordinator who created this todo item
required
title string Short task description shown in the checklist
required
notes text Optional longer description or context for the todo item
-
is_completed boolean Whether this todo has been checked off
required
completed_by_user_id uuid Foreign key to users — who marked this item complete (may differ from creator)
-
completed_at datetime Timestamp when item was marked complete
-
due_date datetime Optional target date for completing this todo
-
sort_order integer Display ordering within the workshop's todo list — coordinator-controlled
required
organization_id uuid Tenant scoping — organization that owns this todo via the parent workshop
required
created_at datetime Record creation timestamp
required
updated_at datetime Last modification timestamp
required

Database Indexes

idx_workshop_todos_workshop_id
btree

Columns: workshop_id

idx_workshop_todos_workshop_sort
btree

Columns: workshop_id, sort_order

idx_workshop_todos_organization_id
btree

Columns: organization_id

idx_workshop_todos_created_by
btree

Columns: created_by_user_id

idx_workshop_todos_is_completed
btree

Columns: workshop_id, is_completed

Validation Rules

title_not_empty error

Validation failed

workshop_exists error

Validation failed

completion_fields_consistent error

Validation failed

due_date_not_in_past_on_create warning

Validation failed

sort_order_non_negative error

Validation failed

Business Rules

workshop_scope_isolation
always

A todo item belongs exclusively to one workshop. Todos cannot be moved between workshops. Deleting a workshop cascades deletes to all its todos.

coordinator_only_mutation
on_create

Only coordinators (and org admins acting as coordinators) may create, edit, reorder, or delete todo items. Peer mentors have read-only access to the list.

completion_audit_trail
on_update

When is_completed is set to true, completed_by_user_id and completed_at MUST be recorded. When unchecked, both fields are cleared.

Enforced by: Workshop Todo Service
mentor_program_module_guard
always

Todo CRUD is only available when the mentor-program module is enabled for the organization. Requests from tenants without this module enabled are rejected.

organization_tenant_isolation
on_create

organization_id on a todo must match the organization_id of the parent workshop. Cross-tenant access is rejected.

Enforced by: Workshop Todo Service

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage