app.approval_policies
TableRow level security on
Approval policies (Section 4.10 workflow engine): ordered approval steps a spend document passes before its own approval RPC accepts it. Keyed by document type; one Active policy per type per org.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| name | text | No | Policy name. |
| description | text | Yes | What the policy is for, shown to requesters and approvers. |
| document_type | app.spend_document_type | No | Spend document type the policy gates. Contract (settlement rounds) is not gated by policies. |
| currency_code | character(3) | Yes | ISO 4217 currency of applies_above_minor; NULL when the policy applies to every document.References private.currencies.currency_code |
| applies_above_minor | bigint | Yes | The policy applies to documents above this amount in currency_code (and to documents in any other currency); NULL for every document of the type. |
| policy_state | app.approval_policy_state | No | Draft, Active or Retired. Changes only through app.transition_approval_policy. |
| 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 |