Skip to content

app.agreements

TableRow level security on

Agreements prepared for signature (Section 7.4 People): offer letters, contractor agreements, MSAs and NDAs. Sent with a signing token and an access code shown once and stored hashed (invariant 8); signed by the signer through the token or while signed in. A Signed agreement is never revoked or unsigned: its terms, signature and row never change and it moves only to Superseded (journey 9).

Primary key: id

Columns of app.agreements
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
project_iduuidYesProject the agreement covers, whose org it takes; NULL for an org-wide agreement such as an MSA, which names its org.References app.projects.id
offer_iduuidYesOffer the agreement documents, for an offer letter. The foreign key to app.offers is added from the A28 range, which owns offers.References app.offers.id
person_iduuidYesPerson who signs, or the person an organization supplies.References app.people.id
counterparty_iduuidYesExternal organization party to the agreement.References app.counterparties.id
agreement_kindapp.agreement_kindNoOffer Letter, Contractor Agreement, Master Services Agreement or Non-Disclosure Agreement.
titletextNoTitle, Title Case.
bodytextNoFull text the signer reads and signs. Changes only while Proposed.
token_hashbyteaYesSHA-256 of the signing token; the token is shown once when sent. Never selectable by signed-in callers.
access_code_hashtextYesbcrypt hash of the access code that goes with the token. Never selectable by signed-in callers.
token_expires_attimestamp with time zoneYesWhen the signing token stops working.
failed_attemptssmallintNoWrong access codes entered with the token; the token locks at 5.
signed_attimestamp with time zoneYesWhen the agreement was signed.
signed_nametextYesName the signer typed as their signature.
signed_body_sha256textYesSHA-256 of the exact text signed, lowercase hex.
agreement_stateapp.agreement_stateNoAgreement state. Changes only through the agreement RPCs.
deleted_attimestamp with time zoneYesSoft 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_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id