Skip to content

ProjectStepAsset

ProjectStepAsset Schema

Description: User-uploaded artifact attached to a Project step.

Thin join between a Project + step_key (one of the keys in the
template's `checklist_items`) and a File row that holds the actual
storage details (bucket / object_key / mime_type / etc.). The
asset-kind result on a template step completes for the project
iff at least one ready ProjectStepAsset row exists for that
(project_id, step_key) pair.

Step keys are NOT enforced by FK — they're authored strings on
the template's JSONB `checklist_items`. The asset upload endpoint
validates that the key exists on the project's template at write
time; orphaned assets (template renames a key after assets were
uploaded) survive but render in a "step not found" sweep state.

Properties

Name Type Description
id Integer No description
uid UUID No description
project_id Integer No description
step_key String(64) No description
file_id UUID No description
uploaded_by_user_id Integer No description
uploaded_at DateTime No description

Relationships

Relationship Name Type
project Project
file File
uploaded_by User