- build.py: _TEMPLATE_COMPONENTS rewritten around the vet sample (53 kinds —
per-resource slices, jobs, worked appointment_reminder family, tests);
seed tokens dropped from the manifest ('sample: vet' instead)
- registry.py: get_app_component(kind) no longer renames item/example seeds;
prompts and tool docs updated to 'copy a slice and adapt'
- templates/README.md, 01_build_recipe, 40_ui_admin, wiki/03 updated off the
old seed scheme; repo inventory/config now exclude vet (docs move under
standards; react/vet itself is deleted in a later phase)
- regenerated MCP bundle, vendored templates, and site output
26 lines
683 B
Python
26 lines
683 B
Python
"""# Summary
|
|
|
|
Vets persistence ports — integer-id document and repository factory.
|
|
"""
|
|
from mongo_ops import BaseDocument
|
|
from pydantic import Field
|
|
|
|
from domain.vets.models import Vet
|
|
from infra.db.repos import create_repo
|
|
|
|
|
|
class VetDocument(Vet, BaseDocument):
|
|
"""Persisted vet document. The integer ``id`` shadows the ObjectId."""
|
|
|
|
id: int | None = Field(default=None, validation_alias="_id")
|
|
|
|
|
|
def create_vet_repo():
|
|
"""Create the vet repository selected by ``settings.repo_backend``.
|
|
|
|
Returns:
|
|
IntIdMemoryRepository | IntIdMongoRepository: Repository wired to the
|
|
``vets`` collection/store.
|
|
"""
|
|
return create_repo("vets", VetDocument)
|