"""Persistence layer constants.

Single source of truth for pagination, query limits, and database defaults.
"""

from typing import Final

# =============================================================================
# Pagination Defaults
# =============================================================================

DEFAULT_LIST_LIMIT: Final[int] = 100
"""Default number of items to return in list queries."""

DEFAULT_CALENDAR_EVENT_LIMIT: Final[int] = 20
"""Default number of calendar events to fetch."""

DEFAULT_WEBHOOK_DELIVERY_HISTORY_LIMIT: Final[int] = 50
"""Default number of webhook deliveries to return in history."""

# =============================================================================
# Query Limits
# =============================================================================

MAX_MEETINGS_LIMIT: Final[int] = 1000
"""Maximum number of meetings that can be returned in a single query."""

MIN_LIST_LIMIT: Final[int] = 1
"""Minimum allowed list limit."""

MAX_WEBHOOK_DELIVERIES_LIMIT: Final[int] = 500
"""Maximum number of webhook deliveries that can be returned."""

DEFAULT_LOG_LIMIT: Final[int] = 100
"""Default number of log entries to return."""

MAX_LOG_LIMIT: Final[int] = 1000
"""Maximum number of log entries that can be returned."""

# =============================================================================
# Database Field Sizes
# =============================================================================

DB_STRING_FIELD_LENGTH: Final[int] = 255
"""Standard string field length for database columns."""

DB_SHORT_STRING_LENGTH: Final[int] = 50
"""Short string field length (e.g., status, type fields)."""
