"""
{{ display_name }} - State definition.

This module defines the state schema for the data pipeline workflow.
"""

from typing import Annotated, Optional

from torivers_sdk.automation import BaseState, merge_dict


class {{ class_name }}State(BaseState):
    """State for {{ display_name }} data pipeline.

    Attributes:
        data_url: URL to fetch data from.
        raw_data: Raw data fetched from source.
        dataframe_json: DataFrame serialized as JSON.
        row_count: Number of rows in the dataset.
        column_count: Number of columns in the dataset.
        statistics: Statistical summary of the data.
        processed_data: Final processed data records.
    """

    # Input fields
    data_url: Optional[str] = None
    options: Annotated[dict, merge_dict] = {}

    # Processing fields
    raw_data: Optional[str] = None
    dataframe_json: Optional[str] = None

    # Output fields
    row_count: int = 0
    column_count: int = 0
    statistics: Annotated[dict, merge_dict] = {}
    processed_data: list = []

    # Accumulated metadata
    metadata: Annotated[dict, merge_dict] = {}
