app.clock_punches
TablaSeguridad a nivel de fila activa
Append-only record of clock punches as devices reported them (Section 13). The id is the client id, so a replayed punch is recognized. Written only by app.record_punch, which opens, closes and breaks time entries from them.
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Client-generated punch id; a replay with the same id returns the stored punch. |
| 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 worked.Hace referencia a app.projects.id |
| membership_id | uuid | Sí | Membership of the person who punched; NULL for external crew, who punch through engagement_id.Hace referencia a app.memberships.id |
| shift_id | uuid | Sí | Shift the punch works, when there is one.Hace referencia a app.shifts.id |
| time_entry_id | uuid | Sí | Time entry the punch opened, broke or closed.Hace referencia a app.time_entries.id |
| punch_kind | app.punch_kind | No | In, Break Start, Break End or Out. |
| device_time | timestamp with time zone | No | Time on the device's clock when the person punched. |
| monotonic_offset_ms | bigint | Sí | Milliseconds on the device's monotonic clock between the punch and its upload, to correct a wrong wall clock. |
| received_at | timestamp with time zone | No | When the server received the punch. |
| effective_at | timestamp with time zone | No | Time the punch counts at: the device time when it is within the skew tolerance, otherwise the time the server received it. |
| latitude | numeric(9,6) | Sí | WGS 84 latitude the device reported. |
| longitude | numeric(9,6) | Sí | WGS 84 longitude the device reported. |
| accuracy_m | numeric(8,1) | Sí | Reported accuracy radius in meters. |
| geofence_id | uuid | Sí | Geofence the punch was checked against.Hace referencia a app.geofences.id |
| geofence_verified | boolean | Sí | True when the server found the point inside the geofence (app.point_in_geofence), false when outside, NULL when not checked. |
| skew_flagged | boolean | No | True when the device time fell outside the skew tolerance; the entry is marked for review. |
| source | app.punch_source | No | Mobile or Kiosk. |
| kiosk_device_id | uuid | Sí | Kiosk the punch came from; Kiosk punches only.Hace referencia a app.kiosk_devices.id |
| photo_uri | text | Sí | Storage path of the punch photo, when the kiosk or org takes one. |
| 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 |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| engagement_id | uuid | Sí | Engagement of the external person who punched. Exactly one of membership_id and engagement_id.Hace referencia a app.engagements.id |