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

import datetime as dt
import typing

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


class CatalogEntryBasicObject(UniversalBaseModel):
    """
    Basic catalog entry object returned for list operations
    """

    id: str = pydantic.Field()
    """
    Unique identifier (prefixed with cte_)
    """

    ottimate_company_id: int = pydantic.Field()
    """
    Company ID
    """

    reference_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique key for the catalog entry
    """

    item_name: str = pydantic.Field()
    """
    Item name
    """

    sku: typing.Optional[str] = pydantic.Field(default=None)
    """
    SKU code
    """

    upc: typing.Optional[str] = pydantic.Field(default=None)
    """
    UPC code
    """

    pack_size: typing.Optional[str] = pydantic.Field(default=None)
    """
    Pack size
    """

    uom: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unit of measure
    """

    price: typing.Optional[str] = pydantic.Field(default=None)
    """
    Price (decimal string)
    """

    unit_price: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unit price (decimal string)
    """

    last_purchased_price: typing.Optional[str] = pydantic.Field(default=None)
    """
    Last purchased price (decimal string)
    """

    erp_vendor_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ERP Vendor id from ERP/accounting system
    """

    ottimate_vendor_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Ottimate's resolved vendor name
    """

    is_split_case: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Split case indicator
    """

    last_purchased_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Last purchased date
    """

    created_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Record creation date
    """

    last_modified_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Record last modified date
    """

    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
