Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| user_id | uuid | 2147483647 | null |
|
|
||||||
| consent_type | varchar | 50 | null |
|
|
Тип согласия: terms_of_service, privacy_policy, data_processing |
|||||
| consent_version | varchar | 20 | '1.0'::character varying |
|
|
Версия документа на момент согласия |
|||||
| is_given | bool | 1 | true |
|
|
Дано ли согласие (True = дано, False = отозвано) |
|||||
| ip_address | varchar | 45 | √ | null |
|
|
IP адрес пользователя |
||||
| user_agent | text | 2147483647 | √ | null |
|
|
User Agent браузера |
||||
| device_info | jsonb | 2147483647 | √ | null |
|
|
Дополнительная информация об устройстве (JSONB) |
||||
| created_at | timestamptz | 35,6 | now() |
|
|
||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| user_consents_pkey | Primary key | Asc | id |
| ix_user_consents_created_at | Performance | Asc | created_at |
| ix_user_consents_user_id | Performance | Asc | user_id |
| ix_user_consents_user_id_type | Performance | Asc/Asc | user_id + consent_type |
| uq_user_consents_unique | Must be unique | Asc/Asc/Asc | user_id + consent_type + consent_version |

