ποΈ 18 tables
Tables
18
- βΆ areas 0
- βΆ customers 11,367
- βΆ delivery_states 0
- βΆ messages 0
- βΆ notes 0
- βΆ notes_relations 0
- βΆ notes_types 0
- βΆ order_stages 24
- βΆ orders 12,690
- βΆ orders_history 0
- βΆ payments 0
- βΆ pieces 0
- βΆ routes 0
- βΆ services 20
- βΆ sessions 0
- βΆ stops 0
- βΆ stops_pieces_relations 0
- βΆ users 38
π areas
2 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | numeric | not null | β |
PK
|
β |
|
|
| 2 | name | varchar | not null | β |
|
max 255 |
|
π customers
9 columns
11,367 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | numeric | not null | β |
PK
|
β |
|
|
| 2 | area_id | numeric | null | β |
FK
|
β areas.id |
|
|
| 3 | crm_id | numeric | not null | β |
|
β |
|
|
| 4 | name | varchar | not null | β |
|
max 255 |
|
|
| 5 | address | varchar | null | β |
|
max 400 |
|
|
| 6 | location | varchar | null | β |
|
max 400 |
|
|
| 8 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 9 | updated_at | timestamp | not null |
now()
|
|
β |
|
|
| 10 | phone | text | null | β |
|
β |
|
π delivery_states
2 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | name | varchar | not null | β |
|
max 255 |
|
π messages
15 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | service | message_service_enum | not null | β |
|
β |
|
|
| 3 | author_type | message_author_enum | not null | β |
|
β |
|
|
| 4 | author_id | varchar | null | β |
|
max 255 |
|
|
| 5 | channel_id | varchar | not null | β |
|
max 255 |
|
|
| 6 | chat_id | varchar | not null | β |
|
max 36 |
|
|
| 7 | error_code | varchar | null | β |
|
max 255 |
|
|
| 8 | error_message | varchar | null | β |
|
max 334 |
|
|
| 9 | sms | boolean | null | β |
|
β |
|
|
| 10 | media_uri | varchar | null | β |
|
max 338 |
|
|
| 11 | external_id | varchar | not null | β |
|
max 255 |
|
|
| 12 | status | message_status_enum | not null | β |
|
β |
|
|
| 13 | text | text | null | β |
|
β |
|
|
| 14 | timestamp | timestamp | not null |
now()
|
|
β |
|
|
| 15 | type | varchar | not null | β |
|
max 255 |
|
π notes
5 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | type_id | integer | not null | β |
|
p=32 |
|
|
| 3 | text | text | null | β |
|
β |
|
|
| 4 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 5 | updated_at | timestamp | not null |
now()
|
|
β |
|
π notes_relations
3 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | note_id | integer | not null | β |
|
p=32 |
|
|
| 3 | target_id | integer | not null | β |
|
p=32 |
|
π notes_types
2 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | name | varchar | not null | β |
|
max 255 |
|
π order_stages
8 columns
24 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | varchar | not null | β |
PK
|
max 25 |
|
|
| 2 | display_value | varchar | not null | β |
|
max 100 |
|
|
| 3 | actual_value | varchar | null | β |
|
max 100 |
|
|
| 4 | sequence_number | integer | null | β |
|
p=32 |
|
|
| 5 | colour_code | varchar | null | β |
|
max 10 |
|
|
| 6 | probability | integer | null | β |
|
p=32 |
|
|
| 7 | deal_category | varchar | null | β |
|
max 25 |
|
|
| 8 | is_active | boolean | null | β |
|
β |
|
π orders
11 columns
12,690 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | numeric | not null | β |
PK
|
β |
|
|
| 2 | service_id | numeric | not null | β |
FK
|
β services.id |
|
|
| 3 | customer_id | numeric | not null | β |
FK
|
β customers.id |
|
|
| 4 | crm_id | varchar | null | β |
|
max 38 |
|
|
| 5 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 6 | updated_at | timestamp | not null |
now()
|
|
β |
|
|
| 7 | app_version | varchar | null | β |
|
β |
|
|
| 8 | price | numeric | not null | β |
|
β |
|
|
| 9 | discount | numeric | null | β |
|
β |
|
|
| 10 | discount_type | discount_type_enum | not null | β |
|
β |
|
|
| 11 | finished | boolean | null | β |
|
β |
|
π orders_history
10 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | order_id | integer | null | β |
FK
|
β orders.id |
|
|
| 3 | service_id | integer | not null | β |
|
p=32 |
|
|
| 4 | customer_id | integer | not null | β |
|
p=32 |
|
|
| 5 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 6 | app_version | varchar | not null | β |
|
β |
|
|
| 7 | price | bigint | not null | β |
|
p=64 |
|
|
| 8 | discount | bigint | null | β |
|
p=64 |
|
|
| 9 | discount_type | discount_type_enum | not null |
'amount'::discount_type_enum
|
|
β |
|
|
| 10 | finished | boolean | null | β |
|
β |
|
π payments
6 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | order_id | integer | not null | β |
FK
|
β orders.id |
|
|
| 3 | type | payment_type_enum | not null |
'online'::payment_type_enum
|
|
β |
|
|
| 4 | amount | bigint | not null | β |
|
p=64 |
|
|
| 5 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 6 | updated_at | timestamp | not null |
now()
|
|
β |
|
π pieces
14 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | order_id | integer | not null | β |
FK
|
β orders.id |
|
|
| 3 | status_id | integer | not null | β |
FK
|
β delivery_states.id |
|
|
| 4 | packer_id | integer | not null | β |
FK
|
β users.id |
|
|
| 5 | height | numeric | null | β |
|
β |
|
|
| 6 | width | numeric | null | β |
|
β |
|
|
| 7 | ishm | boolean | null | β |
|
β |
|
|
| 8 | rate | integer | null | β |
|
p=32 |
|
|
| 9 | size | numeric | null | β |
|
β |
|
|
| 10 | quantity | integer | null | β |
|
p=32 |
|
|
| 11 | price | bigint | null | β |
|
p=64 |
|
|
| 12 | mattress_type | mattress_type_enum | null | β |
|
β |
|
|
| 13 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 14 | updated_at | timestamp | not null |
now()
|
|
β |
|
π routes
6 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | driver_id | integer | not null | β |
FK
|
β users.id |
|
|
| 3 | expediter_id | integer | not null | β |
FK
|
β users.id |
|
|
| 4 | car | integer | not null | β |
|
p=32 |
|
|
| 5 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 6 | updated_at | timestamp | not null |
now()
|
|
β |
|
π services
2 columns
20 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | numeric | not null | β |
PK
|
β |
|
|
| 2 | name | varchar | not null | β |
|
max 255 |
|
π sessions
9 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | user_id | integer | not null | β |
FK
|
β users.id |
|
|
| 3 | app_version | varchar | not null | β |
|
β |
|
|
| 4 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 5 | last_seen_at | timestamp | not null |
now()
|
|
β |
|
|
| 6 | expires_at | timestamp | not null | β |
|
β |
|
|
| 7 | revoked_at | timestamp | not null | β |
|
β |
|
|
| 8 | user_agent | varchar | null | β |
|
max 255 |
|
|
| 9 | ip_address | inet | null | β |
|
β |
|
π stops
8 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | route_id | integer | not null | β |
FK
|
β routes.id |
|
|
| 3 | type | stop_type_enum | not null | β |
|
β |
|
|
| 4 | number | integer | not null | β |
|
p=32 |
|
|
| 5 | start_time | timestamp | not null | β |
|
β |
|
|
| 6 | end_time | timestamp | not null | β |
|
β |
|
|
| 7 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 8 | updated_at | timestamp | not null |
now()
|
|
β |
|
π stops_pieces_relations
3 columns
0 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | not null | β |
PK
|
p=32 |
|
|
| 2 | stop_id | integer | not null | β |
|
p=32 |
|
|
| 3 | piece_id | integer | not null | β |
|
p=32 |
|
π users
7 columns
38 rows
| # | Column | Type | Nullable | Default | Constraints | Details | Actions | |
|---|---|---|---|---|---|---|---|---|
| 1 | id | numeric | not null | β |
PK
|
β |
|
|
| 2 | crm_id | numeric | not null | β |
|
β |
|
|
| 3 | type | user_type_enum | not null | β |
|
β |
|
|
| 4 | name | varchar | not null | β |
|
max 255 |
|
|
| 5 | phone | varchar | null | β |
|
max 26 |
|
|
| 6 | created_at | timestamp | not null |
now()
|
|
β |
|
|
| 7 | updated_at | timestamp | not null |
now()
|
|
β |
|