app.inspection_results
TableRow level security on
One result per template item of an inspection, from the canon Inspection Result enumeration. Results freeze at sign-off.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.inspections on insert; never accepted from the caller and never changed.References app.organizations.id |
| inspection_id | uuid | No | Inspection.References app.inspections.id |
| inspection_item_id | uuid | No | Item of the inspection's template.References app.inspection_items.id |
| result_enum_id | text | No | Result: a row of the canon Inspection Result enumeration.References xpms.std_enumeration.record_id |
| note | text | Yes | Finding. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| photo_uri | text | Yes | Object name of the finding's photo in the field-media bucket: <org_id>/inspections/<inspection_id>/<file name>. |
| project_id | uuid | No | Project of the inspection, maintained by the database from the inspection so Compass sync can scope results by project. Never accepted from the caller.References app.projects.id |