""" Pydantic domain models for the CRUD example. This module defines Pydantic models that represent the domain entities used by the service. These models are referenced by the OpenAPI specification for request and response schemas. The models are declarative and framework-agnostic. They contain no persistence logic, validation beyond type constraints, or business behavior. This module is not part of the ``openapi_first`` library API surface. It exists solely to support the example application template. """ from pydantic import BaseModel class ItemBase(BaseModel): """ Base domain model for an item. Defines fields common to all item representations. """ name: str price: float class ItemCreate(ItemBase): """ Domain model for item creation requests. This model is used for request bodies when creating new items. It intentionally excludes the ``id`` field, which is assigned by the service. """ pass class Item(ItemBase): """ Domain model for a persisted item. This model represents the full item state returned in responses, including the server-assigned identifier. """ id: int