# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from datetime import datetime

from pydantic import Field as FieldInfo

from ..._models import BaseModel
from .category_type import CategoryType

__all__ = ["Category"]


class Category(BaseModel):
    id: Optional[int] = None
    """Numeric identifier for a resource"""

    api_type: Optional[str] = FieldInfo(alias="_type", default=None)

    date_created: Optional[datetime] = FieldInfo(alias="dateCreated", default=None)

    idx: Optional[int] = None
    """Optional order value for manual sorting. Lower values appear first."""

    last_updated: Optional[datetime] = FieldInfo(alias="lastUpdated", default=None)

    name: Optional[str] = None
    """Display name"""

    slug: Optional[str] = None
    """The slug is a unique identifier for this category. It is used in URLs."""

    type: Optional[CategoryType] = None
    """The type of category."""

    version: Optional[int] = None
