ProjectFile Schema
Description: A user-uploaded result file attached to a Project.
The file half of a project's deliverables — the final image, a
finder chart, a plot, a photometry CSV. `result_key` links the file
to a declared deliverable in the template's `result_specs` (the
matching entry's `kind` is `image` or `file`); it's nullable so a
freeform attachment with no declared slot is possible later. `kind`
classifies the content for filtering / galleries.
The File row holds the actual storage details (bucket / object_key /
mime_type / etc.). Result keys are NOT enforced by FK — they're
authored strings on the template's JSONB `result_specs`. The upload
endpoint validates the key exists + is a file-kind deliverable on
the project's template at write time.
Properties
| Name | Type | Description |
|---|---|---|
| id | Integer |
No description |
| uid | UUID |
No description |
| project_id | Integer |
No description |
| result_key | String(64) (Optional) |
No description |
| kind | String(32) |
No description |
| label | String(200) (Optional) |
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 |