"""
Cluster DB table names for `livekitvoicebot_cluster` (DATABASE_CLUSTER_URL).

Must match `backend/apps/cluster/dynamic_tables.py` → `ensure_business_cluster_tables`:
  {business_id}_campaigns
  {business_id}_campaign_contacts
  {business_id}_call_history

`business_id` is the numeric tenant id (e.g. 8028 → 8028_campaigns).
"""

from __future__ import annotations


def campaigns_table(business_id: int | str) -> str:
    return f"{int(business_id)}_campaigns"


def campaign_contacts_table(business_id: int | str) -> str:
    return f"{int(business_id)}_campaign_contacts"


def call_history_table(business_id: int | str) -> str:
    """Mcube-style rows (call_status, callid, …) live in this per-tenant table."""
    return f"{int(business_id)}_call_history"
