Перейти к содержанию

БД asterisk

Хост: db-1 (10.10.19.31:5432) Пользователь: asterisk Приложения: CallBox, Asterisk ODBC Realtime

Автоматически сгенерировано: 2026-03-03 09:38

Таблицы

| Таблица | Записей | Описание | FK | |---------|---------|----------|----|| | active_price_cache | 4 | Кэш активных тарифов для быстрого доступ... | — | | alembic_version | -1 | | — | | audit_log | 851 | Audit trail for all CRUD operations | — | | bug_comments | 58 | | 1 FK | | bug_reports | 12 | | 1 FK | | call_billing | 325 | Детальная тарификация исходящих звонков | 2 FK | | call_billing_backup_20260217 | 516 | | — | | call_detail_records | 3,072 | Детальный учет всех звонков в системе | 1 FK | | events | 11,335 | Append-only лог событий Event Bus | — | | greeting_templates | 12 | | — | | incoming_routes | 38 | | 1 FK | | module_roles | -1 | Роли пользователей в модулях (callbox, s... | — | | operator_pause_log | 283 | История постановок на паузу и снятий с п... | 1 FK | | operator_queue_log | 302 | История входов и выходов операторов из о... | 1 FK | | operators | 12 | | 3 FK | | organization_notifications | 176 | Настройки автооповещений для организаций... | 2 FK | | organization_users | 56 | User accounts for organization portal ac... | 1 FK | | organizations | 230 | | — | | password_reset_tokens | 1 | Password reset tokens with 1-hour expira... | 1 FK | | ps_aors | 169 | | 1 FK | | ps_aors_backup_016 | -1 | | — | | ps_auths | 169 | | 1 FK | | ps_auths_backup_016 | -1 | | — | | ps_endpoints | 161 | | 1 FK | | ps_endpoints_backup_016 | -1 | | — | | queue_log | 2,837 | | — | | queue_members | 8 | | 1 FK | | queues | 306 | | 1 FK | | route_greeting_blocks | -1 | | 2 FK | | sms_billing | -1 | | 1 FK | | staff_password_reset_tokens | -1 | | 1 FK | | staff_permissions | -1 | Individual permissions for staff users | 1 FK | | staff_users | 5 | Staff accounts (Проектный отдел) with ac... | — | | support_bot_actions | -1 | | — | | support_bot_messages | -1 | | — | | support_bot_sessions | -1 | | 1 FK | | system_settings | 2 | | — | | working_hours | 2,506 | График работы очередей организаций | 1 FK |

Схема связей (Mermaid)

erDiagram
    bug_reports ||--o{ bug_comments : "bug_id"
    staff_users ||--o{ bug_reports : "created_by"
    call_detail_records ||--o{ call_billing : "cdr_id"
    organizations ||--o{ call_billing : "organization_id"
    organizations ||--o{ call_detail_records : "tenant_id"
    organizations ||--o{ incoming_routes : "tenant_id"
    organizations ||--o{ operator_pause_log : "tenant_id"
    organizations ||--o{ operator_queue_log : "tenant_id"
    organizations ||--o{ operators : "org_id"
    organizations ||--o{ operators : "tenant_id"
    organization_users ||--o{ operators : "user_id"
    incoming_routes ||--o{ organization_notifications : "cli_route_id"
    organizations ||--o{ organization_notifications : "organization_id"
    organizations ||--o{ organization_users : "organization_id"
    organization_users ||--o{ password_reset_tokens : "user_id"
    organizations ||--o{ ps_aors : "tenant_id"
    organizations ||--o{ ps_auths : "tenant_id"
    organizations ||--o{ ps_endpoints : "tenant_id"
    organizations ||--o{ queue_members : "tenant_id"
    organizations ||--o{ queues : "tenant_id"
    incoming_routes ||--o{ route_greeting_blocks : "route_id"
    greeting_templates ||--o{ route_greeting_blocks : "template_id"
    organizations ||--o{ sms_billing : "organization_id"
    staff_users ||--o{ staff_password_reset_tokens : "staff_user_id"
    staff_users ||--o{ staff_permissions : "staff_user_id"
    organizations ||--o{ support_bot_sessions : "organization_id"
    organizations ||--o{ working_hours : "tenant_id"