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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .datetime_nullable import DatetimeNullable
from .email import Email


class BillQueryRecord2BillApprovalsItem(UniversalBaseModel):
    approved: typing.Optional[int] = pydantic.Field(default=None)
    """
    Indicates whether the bill has been approved. `0` is false, and `1` is true.
    """

    approved_time: typing_extensions.Annotated[
        typing.Optional[DatetimeNullable], FieldMetadata(alias="approvedTime")
    ] = pydantic.Field(default=None)
    """
    Timestamp of when the approval was made, in UTC.
    """

    comments: typing.Optional[str] = pydantic.Field(default=None)
    """
    Additional comments on the approval.
    """

    email: typing.Optional[Email] = pydantic.Field(default=None)
    """
    The approving user's email address.
    """

    id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="Id")] = pydantic.Field(default=None)
    """
    The approving user's ID.
    """

    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
