Model complex business domains with entities, value objects, and bounded contexts.
| Entity vs VO | Has unique ID + lifecycle? Entity. Otherwise VO | | Entity equality | By ID, not attributes | | Value object mutability | Always immutable (frozen=True) | | Repository scope | One per aggregate root | | Domain events | Collect in entity, publish after persist | | Context boundaries | By business capability, not technical |
entities Keywords: entity, identity, lifecycle, mutable, domain object Solves: Model entities in Python, identity equality, adding behavior
Тактические шаблоны предметно-ориентированного проектирования для сложных бизнес-доменов. Используйте при моделировании сущностей, объектов значений, доменных служб, репозиториев или установления ограниченных контекстов. Источник: yonatangross/orchestkit.