app.spend_authorities
TableRow level security on
Spend authority limits (Section 8.1) by role or person, document type, GL account or cost center scope, and amount. An approval above every limit that applies is refused; above the dual approval threshold it needs two approvers. No applicable row is an absent claim and refuses (Section 3.7).
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 |
| role_id | uuid | Yes | Role whose holders the limit applies to; NULL when it applies to one person.References app.roles.id |
| membership_id | uuid | Yes | Membership of the one person the limit applies to; NULL when it applies to a role.References app.memberships.id |
| document_type | app.spend_document_type | No | Document type the limit applies to. |
| account_code | text | Yes | GL account the limit is scoped to; NULL for every account.References xpms.dim_gl_account.account_code |
| cost_center_id | uuid | Yes | Cost center the limit is scoped to; NULL for every cost center.References app.cost_centers.id |
| currency_code | character(3) | No | ISO 4217 currency of the amounts (the org currency).References private.currencies.currency_code |
| limit_minor | bigint | No | Largest amount the holder may approve, in minor units. |
| dual_approval_above_minor | bigint | Yes | Amount above which two distinct approvers are needed; NULL for never. |
| valid_from | timestamp with time zone | No | When the limit starts. |
| valid_to | timestamp with time zone | Yes | When the limit ends; NULL while open-ended. |
| 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 |