Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| consent_id | uuid | 2147483647 | null |
|
|
||||||
| company_id | uuid | 2147483647 | null |
|
|
||||||
| user_id | uuid | 2147483647 | null |
|
|
||||||
| agreement_type | varchar | 30 | null |
|
|
||||||
| policy_version | varchar | 40 | null |
|
|
||||||
| agreed | bool | 1 | null |
|
|
||||||
| request_id | varchar | 128 | null |
|
|
||||||
| recorded_at | timestamptz | 35,6 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_user_agreement_consent | Primary key | Asc | consent_id |
| idx_user_agreement_consent_user_time | Performance | Asc/Asc/Asc/Asc | company_id + user_id + agreement_type + recorded_at |
| uq_user_agreement_consent_id_company | Must be unique | Asc/Asc | consent_id + company_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_user_agreement_consent_request_not_blank | ((char_length(TRIM(BOTH FROM request_id)) > 0)) |
| ck_user_agreement_consent_type | (((agreement_type)::text = ANY ((ARRAY['SERVICE_TERMS'::character varying, 'PRIVACY_POLICY'::character varying, 'MARKETING'::character varying])::text[]))) |
| ck_user_agreement_consent_version_not_blank | ((char_length(TRIM(BOTH FROM policy_version)) > 0)) |



