app.consent_records
TableRow level security on
Consent given by a person to an org for one purpose (Section 14.3): the notice version shown, where and when it was captured, and its withdrawal. One row per grant; a withdrawal closes the row and a new grant opens a new row.
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 |
| person_id | uuid | No | Person who consented.References app.people.id |
| purpose_code | text | No | Purpose consented to.References private.consent_purposes.code |
| notice_version | text | No | Version of the notice or policy shown when consent was given. |
| source | app.consent_source | No | Where consent was captured. |
| captured_at | timestamp with time zone | No | When consent was given. Set by the database. |
| captured_ip | inet | Yes | Client IP address at capture, as evidence. Set by the database. |
| withdrawn_at | timestamp with time zone | Yes | When the person withdrew consent, or null while it stands. |
| 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. |