Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | null |
|
|
id покупателя |
||||||||||||||||||||||||||||||||
| name | text | 2147483647 | null |
|
|
Название покупателя |
||||||||||||||||||||||||||||||||
| responsible_user_id | int4 | 10 | √ | null |
|
|
id пользователя, ответственного за покупателя |
|||||||||||||||||||||||||||||||
| status_id | int4 | 10 | null |
|
|
ID статуса покупателя в аккаунте |
||||||||||||||||||||||||||||||||
| purchases_count | int4 | 10 | null |
|
|
Количество покупок |
||||||||||||||||||||||||||||||||
| periodicity | int4 | 10 | null |
|
|
Периодичность |
||||||||||||||||||||||||||||||||
| next_date | timestamp | 29,6 | √ | null |
|
|
Ожидаемая дата следующей покупки |
|||||||||||||||||||||||||||||||
| next_price | numeric | 0 | √ | null |
|
|
Ожидаемая сумма покупки |
|||||||||||||||||||||||||||||||
| ltv | int4 | 10 | √ | null |
|
|
Сумма покупок |
|||||||||||||||||||||||||||||||
| labor_cost | int4 | 10 | null |
|
|
Стоимость труда |
||||||||||||||||||||||||||||||||
| average_check | int4 | 10 | √ | null |
|
|
Средний размер покупки |
|||||||||||||||||||||||||||||||
| is_deleted | bool | 1 | null |
|
|
Удален ли покупатель |
||||||||||||||||||||||||||||||||
| closest_task_at | timestamp | 29,6 | √ | null |
|
|
Дата ближайшей задачи к выполнению |
|||||||||||||||||||||||||||||||
| created_at | timestamp | 29,6 | null |
|
|
Дата создания покупателя |
||||||||||||||||||||||||||||||||
| updated_at | timestamp | 29,6 | null |
|
|
Дата изменения покупателя |
||||||||||||||||||||||||||||||||
| created_by | int4 | 10 | null |
|
|
id пользователя, создавшего покупателя |
||||||||||||||||||||||||||||||||
| updated_by | int4 | 10 | null |
|
|
id пользователя, изменившего покупателя |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| customers_pkey | Primary key | Asc | id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| customers_created_by_check | ((created_by >= 0)) |
| customers_updated_by_check | ((updated_by >= 0)) |

