app.incidents
TablaSeguridad a nivel de fila activa
Incidents of a project (Incident CAD log). A critical incident cannot be relabeled and closed in one statement, and closing requires sign-off (invariant 22).
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| project_id | uuid | No | Project.Hace referencia a app.projects.id |
| incident_number | bigint | No | Number from the project's display key sequence. |
| title | text | No | What happened. |
| severity_enum_id | text | No | Severity: a row of the canon Incident Severity enumeration; Level 1 - Critical is critical.Hace referencia a xpms.std_enumeration.record_id |
| zone_id | uuid | Sí | Zone where it happened.Hace referencia a app.zones.id |
| occurred_at | timestamp with time zone | No | When it happened. |
| reported_by | uuid | Sí | Reporter, from the session.Hace referencia a app.people.id |
| incident_state | app.incident_state | No | Incident state. Changes only through the incident RPCs. |
| closed_signed_off_by | uuid | Sí | Person who signed off the closure.Hace referencia a app.people.id |
| deleted_at | timestamp with time zone | Sí | 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 | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| latitude | numeric(9,6) | Sí | Latitude where the incident was reported (WGS 84), when the reporter's device gave one. |
| longitude | numeric(9,6) | Sí | Longitude where the incident was reported (WGS 84), when the reporter's device gave one. |
| accuracy_m | numeric(8,1) | Sí | Horizontal accuracy of the location in meters, as the device reported it. |
| device_reported_at | timestamp with time zone | Sí | When the reporter filed the report on the device; differs from created_at when the report was queued offline. |