Saltar al contenido

app.approval_instances

TablaSeguridad a nivel de fila activa

A spend document going through its approval policy. Created only by app.request_approval, which reads the amount, currency and project from the document; decided step by step through app.decide_approval.

Clave primaria: id

Columnas de app.approval_instances
ColumnaTipoAdmite nulosDescripción
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.approval_policies on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id
approval_policy_iduuidNoPolicy the document goes through.Hace referencia a app.approval_policies.id
document_typeapp.spend_document_typeNoSpend document type.
document_iduuidNoId of the document in subject_table.
subject_tabletextNoTable of the document: purchase_orders, po_change_orders, change_orders, invoices, requisitions, expenses or payroll_runs.
subject_referencetextSíThe document's own number or name when requested, for display.
project_iduuidSíProject of the document; NULL for org-level documents such as payroll runs.Hace referencia a app.projects.id
amount_minorbigintNoAmount submitted for approval, in minor units; the approval covers the document only while its amount stays at or below it.
currency_codecharacter(3)NoISO 4217 currency of the amount.Hace referencia a private.currencies.currency_code
requested_byuuidNoPerson who requested the approval; never an approver of it (sod_approval_requester).Hace referencia a app.people.id
approval_stateapp.approval_stateNoIn Review, Approved, Rejected or Canceled. Changes only through the approval RPCs.
current_stepsmallintNoStep order waiting for a decision while In Review; the last step decided afterwards.
decided_attimestamp with time zoneSíWhen the approval was approved, rejected or canceled; NULL while In Review.
deleted_attimestamp with time zoneSíSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidSíPerson who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidSíPerson who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id