"""
Data models for parallel time-shift execution.

Supports splitting configs by provider and tracking multiple concurrent jobs.
"""

from dataclasses import dataclass
from typing import List, Optional
from .time_shift_models import TimeShiftConfig


@dataclass
class ProviderConfig:
    """Configuration for single provider time-shift."""

    provider: str
    config: TimeShiftConfig
    dataset_name: str  # For unique message_group_id


@dataclass
class JobSubmission:
    """Submitted job information."""

    provider: str
    job_id: str
    dataset_name: str


@dataclass
class ProviderResult:
    """Result from single provider time-shift."""

    provider: str
    job_id: str
    status: str  # "completed", "failed", "running"
    drops_completed: int
    drops_total: int
    records_processed: int
    time_elapsed: float
    error_message: Optional[str] = None


@dataclass
class AggregateResult:
    """Aggregated results from all provider time-shifts."""

    total_drops: int
    drops_completed: int
    drops_failed: int
    total_records: int
    total_time: float
    provider_results: List[ProviderResult]
