Skip to content

Report

A Report is a named deliverable — a debrief, credit audit or briefing document — pairing a title and type with the file that holds it.

Reports are how finished work reaches the client. The row itself is metadata: a title, a type discriminator and a pointer to the Attachment holding the actual file. A report may be scoped to a project or sit at organisation level. Because the file lives on the attachment, a report row can exist before its file is uploaded, which is why the typed relations on Project all require a non-null file_id.

Reports are listed on the project and document pages and served through the attachment download route.

  • app/Services/ProjectService.php — builds the aggregated report list, merging focus individuals in as pseudo-reports with type: 'focus-individual'.
  • app/Http/Controllers/Projects/ProjectsDocumentHubController.php — the document hub page.
  • app/Services/Voice/Tools/ListReports.php and GetReport.php — expose reports to the voice agent.
  • app/Filament/Resources/ReportResource.php — staff administration.
  • resources/js/lib/reports.ts — the client-side downloadReport helper.
Relation Type Related model
project belongsTo Project
organization belongsTo Organization
file belongsTo Attachment

project() is declared withDefault(), so a report without a project returns an empty model rather than null. Inverses are Project::reports() and Organization::reports().

Table reports. Primary key is a UUID (HasUuids).

Column Type Notes
id uuid Primary key
title string Display name
type string Discriminator, see values below
project_id uuid Nullable, FK to projects
organization_id uuid Nullable, FK to organizations
file_id uuid Nullable, FK to attachments
created_at, updated_at datetime Timestamps

Types referenced by the typed relations on Project are data_credit, focus_individuals_all, talent_debrief, credit_audit and briefing_confirmation. The column is a plain string, not an enum, so other values may exist.