# This file was auto-generated by Fern from our API Definition.

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class BaseSearchResponseDto(UniversalBaseModel):
    """
    The base response model containing common fields for search operations.
    """

    status: str = pydantic.Field()
    """
    The status of the response.
    """

    total_hits: int = pydantic.Field()
    """
    The total number of articles matching the search criteria.
    """

    page: int = pydantic.Field()
    """
    The current page number of the results.
    """

    total_pages: int = pydantic.Field()
    """
    The total number of pages available for the given search criteria.
    """

    page_size: int = pydantic.Field()
    """
    The number of articles per page.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
