[
  {
    "table": "sales_leads",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "lead_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "source_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "source_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "source_campaign_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "full_name",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "company_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "phone",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "email",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "messenger_handles_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "lead_temperature",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "lead_score",
        "type": "REAL",
        "nullable": false,
        "default": "50",
        "primary_key": 0
      },
      {
        "name": "customer_type",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "segment_type",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "initial_need_summary",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "preferred_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "assigned_agent_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "crm_customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_leads_phone_email",
        "column_names": [
          "phone",
          "email"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_leads_tenant_status_score",
        "column_names": [
          "tenant_id",
          "status",
          "lead_score"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "lead_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_deals",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "lead_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "pipeline_id",
        "type": "TEXT",
        "nullable": false,
        "default": "'sales_default'",
        "primary_key": 0
      },
      {
        "name": "stage_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "scenario_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "priority",
        "type": "INTEGER",
        "nullable": false,
        "default": "3",
        "primary_key": 0
      },
      {
        "name": "title",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "need_summary",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "product_context_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "estimated_amount",
        "type": "REAL",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "final_amount",
        "type": "REAL",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "currency",
        "type": "TEXT",
        "nullable": false,
        "default": "'KZT'",
        "primary_key": 0
      },
      {
        "name": "payment_model",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "document_required",
        "type": "INTEGER",
        "nullable": false,
        "default": "1",
        "primary_key": 0
      },
      {
        "name": "payment_required",
        "type": "INTEGER",
        "nullable": false,
        "default": "1",
        "primary_key": 0
      },
      {
        "name": "assigned_human_user_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "assigned_ai_orchestrator_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "preferred_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "current_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'active'",
        "primary_key": 0
      },
      {
        "name": "won_reason",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "lost_reason",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "close_reason",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "next_action_type",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "next_action_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "last_contact_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "closed_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_deals_customer_channel",
        "column_names": [
          "customer_id",
          "current_channel"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_deals_next_action",
        "column_names": [
          "next_action_at",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_deals_tenant_stage_status",
        "column_names": [
          "tenant_id",
          "stage_id",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "deal_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_communication_sessions",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "communication_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "lead_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "channel_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "direction",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "agent_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "started_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "ended_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "duration_sec",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "subject",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'active'",
        "primary_key": 0
      },
      {
        "name": "summary",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "transcript_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "next_action_type",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "next_action_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "sentiment",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "result_code",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "metadata_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_comm_channel_status",
        "column_names": [
          "channel_type",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_comm_deal_started",
        "column_names": [
          "deal_id",
          "started_at"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "communication_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_messages",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "message_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "communication_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "sender_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "sender_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "channel_provider",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_message_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "body",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "attachments_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'[]'",
        "primary_key": 0
      },
      {
        "name": "delivery_status",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "read_status",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "message_metadata_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "sent_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_messages_deal_sent",
        "column_names": [
          "deal_id",
          "sent_at"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_messages_ext_id",
        "column_names": [
          "channel_provider",
          "external_message_id"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "message_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_calls",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "call_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "communication_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "phone_number",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "direction",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "provider",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_call_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "recording_url",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "transcript_status",
        "type": "TEXT",
        "nullable": false,
        "default": "'pending'",
        "primary_key": 0
      },
      {
        "name": "transcript_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "call_status",
        "type": "TEXT",
        "nullable": false,
        "default": "'started'",
        "primary_key": 0
      },
      {
        "name": "summary",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "started_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "ended_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "duration_sec",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_calls_deal_started",
        "column_names": [
          "deal_id",
          "started_at"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_calls_ext_provider",
        "column_names": [
          "provider",
          "external_call_id"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "call_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_transcripts",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "transcript_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "call_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "language",
        "type": "TEXT",
        "nullable": false,
        "default": "'ru'",
        "primary_key": 0
      },
      {
        "name": "transcript_text",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "diarization_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "extracted_entities_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "transcript_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_notes",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "note_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "author_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "author_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "note_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "content",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "note_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_offers",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "offer_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "offer_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "title",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "description",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "line_items_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'[]'",
        "primary_key": 0
      },
      {
        "name": "pricing_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "total_amount",
        "type": "REAL",
        "nullable": false,
        "default": "0",
        "primary_key": 0
      },
      {
        "name": "currency",
        "type": "TEXT",
        "nullable": false,
        "default": "'KZT'",
        "primary_key": 0
      },
      {
        "name": "validity_until",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'draft'",
        "primary_key": 0
      },
      {
        "name": "rendered_document_url",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_by_type",
        "type": "TEXT",
        "nullable": false,
        "default": "'text_ai'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_offers_deal_status",
        "column_names": [
          "deal_id",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "offer_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_deal_conditions",
    "exists": false
  },
  {
    "table": "sales_conditions",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "condition_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "product_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "service_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "quantity",
        "type": "REAL",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "unit",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "delivery_mode",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "execution_date",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "start_date",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "end_date",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "payment_terms",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "custom_terms_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "agreed_price",
        "type": "REAL",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "currency",
        "type": "TEXT",
        "nullable": false,
        "default": "'KZT'",
        "primary_key": 0
      },
      {
        "name": "confirmed_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "condition_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_counterparties",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "counterparty_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "company_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "full_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "bin_iin",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "address",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "bank_details_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "signer_name",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "signer_role",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "signer_basis",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "email_for_docs",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "phone_for_docs",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "completeness_status",
        "type": "TEXT",
        "nullable": false,
        "default": "'draft'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "counterparty_id"
        ]
      },
      {
        "name": null,
        "column_names": [
          "deal_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_documents",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "document_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "document_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "template_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "version",
        "type": "INTEGER",
        "nullable": false,
        "default": "1",
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'draft'",
        "primary_key": 0
      },
      {
        "name": "file_url",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "rendered_payload_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "external_sign_provider_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "signed_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_documents_deal_status",
        "column_names": [
          "deal_id",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "document_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_invoices",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "invoice_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "invoice_number",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "basis_document_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "amount",
        "type": "REAL",
        "nullable": false,
        "default": "0",
        "primary_key": 0
      },
      {
        "name": "currency",
        "type": "TEXT",
        "nullable": false,
        "default": "'KZT'",
        "primary_key": 0
      },
      {
        "name": "due_date",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'draft'",
        "primary_key": 0
      },
      {
        "name": "payment_link",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "line_items_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'[]'",
        "primary_key": 0
      },
      {
        "name": "metadata_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "issued_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "paid_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_invoices_deal_status_due",
        "column_names": [
          "deal_id",
          "status",
          "due_date"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "invoice_id"
        ]
      },
      {
        "name": null,
        "column_names": [
          "invoice_number"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_payments",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "payment_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "invoice_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "payment_provider",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_payment_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "amount",
        "type": "REAL",
        "nullable": false,
        "default": "0",
        "primary_key": 0
      },
      {
        "name": "currency",
        "type": "TEXT",
        "nullable": false,
        "default": "'KZT'",
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'pending'",
        "primary_key": 0
      },
      {
        "name": "paid_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "payment_method",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "failure_reason",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "metadata_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_payments_deal_status",
        "column_names": [
          "deal_id",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "payment_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_stage_history",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "history_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "from_stage_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "to_stage_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "changed_by_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "changed_by_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "reason",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "changed_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_stage_history_deal_changed",
        "column_names": [
          "deal_id",
          "changed_at"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "history_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_escalations",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "escalation_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "escalation_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "reason",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "severity",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'open'",
        "primary_key": 0
      },
      {
        "name": "assigned_to_user_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "resolved_at",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_escalations_deal_status",
        "column_names": [
          "deal_id",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "escalation_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_automation_tasks",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "task_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "task_type",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "payload_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "run_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "status",
        "type": "TEXT",
        "nullable": false,
        "default": "'pending'",
        "primary_key": 0
      },
      {
        "name": "retry_count",
        "type": "INTEGER",
        "nullable": false,
        "default": "0",
        "primary_key": 0
      },
      {
        "name": "last_error",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_tasks_run_status",
        "column_names": [
          "run_at",
          "status"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "task_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_channel_switches",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "switch_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "communication_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "from_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "to_channel",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "reason_for_channel_switch",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "switched_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_channel_switches_deal_switched",
        "column_names": [
          "deal_id",
          "switched_at"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "switch_id"
        ]
      }
    ],
    "foreign_keys": []
  },
  {
    "table": "sales_external_links",
    "exists": true,
    "columns": [
      {
        "name": "id",
        "type": "INTEGER",
        "nullable": true,
        "default": null,
        "primary_key": 1
      },
      {
        "name": "link_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "tenant_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "deal_id",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "communication_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "sales_call_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "channel_provider",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_thread_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_chat_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_call_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "voice_session_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "ai_session_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "interaction_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "customer_id",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "phone_number",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "external_status",
        "type": "TEXT",
        "nullable": true,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "link_metadata_json",
        "type": "TEXT",
        "nullable": false,
        "default": "'{}'",
        "primary_key": 0
      },
      {
        "name": "created_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "updated_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      },
      {
        "name": "last_sync_at",
        "type": "TEXT",
        "nullable": false,
        "default": null,
        "primary_key": 0
      }
    ],
    "pk": {
      "constrained_columns": [
        "id"
      ],
      "name": null
    },
    "indexes": [
      {
        "name": "idx_sales_external_links_customer_phone",
        "column_names": [
          "customer_id",
          "phone_number"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_external_links_deal_sync",
        "column_names": [
          "deal_id",
          "last_sync_at"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_external_links_external_call",
        "column_names": [
          "external_call_id"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_external_links_interaction",
        "column_names": [
          "interaction_id"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_external_links_thread",
        "column_names": [
          "external_thread_id"
        ],
        "unique": 0,
        "dialect_options": {}
      },
      {
        "name": "idx_sales_external_links_voice_session",
        "column_names": [
          "voice_session_id"
        ],
        "unique": 0,
        "dialect_options": {}
      }
    ],
    "unique_constraints": [
      {
        "name": null,
        "column_names": [
          "link_id"
        ]
      }
    ],
    "foreign_keys": []
  }
]