"""Test-only entity used to exercise the framework without pulling in a real domain entity. Milestone 0.5 introduces the Registrant entity for the vertical slice; until then, this Thing model is enough to prove CRUD + audit + versioning. """ from __future__ import annotations from pydantic import BaseModel from sqlalchemy import String from sqlalchemy.orm import Mapped, mapped_column from ypms.db import Base from ypms.framework.base import SoftDeleteMixin, TimestampMixin, VersionedMixin class Thing(Base, TimestampMixin, SoftDeleteMixin, VersionedMixin): __tablename__ = "things" id: Mapped[int] = mapped_column(primary_key=True) name: Mapped[str] = mapped_column(String(64), nullable=False) color: Mapped[str | None] = mapped_column(String(32), nullable=True) class ThingCreate(BaseModel): name: str color: str | None = None class ThingUpdate(BaseModel): name: str | None = None color: str | None = None class ThingRead(BaseModel): id: int name: str color: str | None = None version: int