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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .address import Address


class Account(UniversalBaseModel):
    """
    Company/organization record
    """

    name: str = pydantic.Field()
    """
    Company name
    """

    industry: typing.Optional[str] = pydantic.Field(default=None)
    """
    e.g., Technology, Healthcare, Finance
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    e.g., Customer, Prospect, Partner
    """

    phone: typing.Optional[str] = None
    website: typing.Optional[str] = None
    revenue: typing.Optional[float] = pydantic.Field(default=None)
    """
    Annual revenue
    """

    employees: typing.Optional[int] = None
    address: typing.Optional[Address] = None
    description: typing.Optional[str] = None
    rating: typing.Optional[str] = pydantic.Field(default=None)
    """
    e.g., Hot, Warm, Cold
    """

    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
