docs(standards): add reusable Tier-B template scaffolds (pipeline family, shared loader/registry, converters, scripts)

This commit is contained in:
2026-10-12 21:08:19 +05:30
parent 99fac53c2b
commit 52b4d76d93
15 changed files with 356 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
"""# Summary
Optional converters for the item slice — pure functions mapping between domain
types. Add a converter here when a service must reshape data; keep it pure.
"""
from domain.item.models import Item
def to_item(data: dict) -> Item:
"""Build an :class:`Item` from a raw mapping.
Args:
data (dict): Field mapping matching the item model.
Returns:
Item: The constructed item model.
"""
return Item(**data)