app.form_submissions
TablaSeguridad a nivel de fila activa
A submitted form: its answers against one template version, score, GPS stamp, signature and approval. Written only through app.submit_form; a project submission links to the record it became.
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.form_templates on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| form_template_id | uuid | No | Form answered.Hace referencia a app.form_templates.id |
| form_template_version_id | uuid | No | Version of the form answered.Hace referencia a app.form_template_versions.id |
| project_id | uuid | Sí | Project the submission belongs to, when any.Hace referencia a app.projects.id |
| record_id | uuid | Sí | Record the project submission became.Hace referencia a app.records.id |
| submitted_by_membership_id | uuid | No | Member who submitted.Hace referencia a app.memberships.id |
| answers | jsonb | No | Answers keyed by field key. |
| score | numeric | Sí | Points earned, when the form scores answers. |
| max_score | numeric | Sí | Points available on the fields shown. |
| passed | boolean | Sí | Whether the score met the passing score; NULL when the form has none. |
| latitude | numeric | Sí | GPS latitude at submission. |
| longitude | numeric | Sí | GPS longitude at submission. |
| accuracy_m | numeric | Sí | GPS accuracy in metres. |
| signer_name | text | Sí | Name of the person who signed. |
| signature_path | text | Sí | Storage path of the signature image in the field-media bucket. |
| signed_at | timestamp with time zone | Sí | When it was signed. |
| submission_state | app.form_submission_state | No | Submitted, Approved, Rejected or Recorded. |
| decided_by_membership_id | uuid | Sí | Approver who decided.Hace referencia a app.memberships.id |
| decision_note | text | Sí | Approver's note. |
| 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. |