app.offer_versions
TableRow level security on
Append-only terms of an offer, one row per proposal or counter, numbered by the database. Both sides read every version; nothing internal is stored here.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.offers on insert; never accepted from the caller and never changed.References app.organizations.id |
| offer_id | uuid | No | Offer.References app.offers.id |
| version_number | integer | No | Version within the offer, issued by the database; the highest is in force. |
| proposed_side | app.offer_side | No | Organization or Party. |
| proposed_by | uuid | Yes | Person who proposed it, set from the session.References app.people.id |
| rate_type | app.rate_type | Yes | Hourly, Day, Flat or Milestone. |
| amount_minor | bigint | Yes | Offered amount per rate unit in minor units; NULL when the version leaves the amount open. |
| currency_code | character(3) | Yes | ISO 4217 currency of the amount.References private.currencies.currency_code |
| starts_on | date | Yes | First day of the work offered. |
| ends_on | date | Yes | Last day of the work offered. |
| message | text | Yes | Message to the other side with the terms. Visible to both sides. |
| expires_at | timestamp with time zone | Yes | When the version lapses unanswered. |
| 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 |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |