app.budget_lines
TableRow level security on
Budget lines (Section 7.4). The unit price is NULL when unpriced and never defaulted to zero; the extended amount is derived. The GL account is derived, never stored: the priced item's explicit GL default first, then the URID's class account, then the counterparty type's default (decision D13 as owner decision 39 reads it, private.gl_account_for_line).
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.budgets on insert; never accepted from the caller and never changed.References app.organizations.id |
| budget_id | uuid | No | Budget the line belongs to.References app.budgets.id |
| line_number | integer | No | Order of the line within the budget. |
| description | text | No | Sentence-case line description. |
| line_type | app.budget_line_type | No | Cost, Labor, Fee or Contingency. |
| urid | text | No | Dimension 2: canon discipline or category the line spends on. Its class gives the GL account when the priced item carries no explicit GL default; the counterparty type's default applies only when neither gives one. |
| cost_center_id | uuid | Yes | Dimension 1: cost center the line posts to.References app.cost_centers.id |
| grade_code | text | Yes | Price grade: base, elevated or premium (decision D11).References xpms.grade.code |
| element_id | text | Yes | Catalog element priced by the line, when one applies. Its explicit GL default (purchase account) comes before the URID class's account.References xpms.elements.element_id |
| quantity | numeric | No | Quantity, in unit_basis. |
| unit_basis | text | Yes | Unit of the quantity from the controlled unit list.References xpms.dim_unit_alias.alias |
| unit_price_minor | bigint | Yes | Unit price in minor units of the budget currency; NULL is unpriced and renders as Unpriced. |
| xyz | xpms.xyz_tag | No | XYZ schema-family tag of the line. |
| xyz_basis | app.xyz_basis | No | Basis of the XYZ tag: Category (equals the URID category's tag) or Declared. |
| 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 |
| phase_code | text | Yes | Gated phase the line is spent in (Section 3.4).References xpms.dim_phase.phase_code |
| tier_code | text | Yes | Tier of experience the line serves (Section 3.5).References xpms.dim_tier.tier_code |