Value Object
If the cosmos db interface extends NestedPath, it is a Value Object on domain side
Cosmos DB Model
/infrastructure/data-sources/cosmos-db/models/minicex.ts
Each value object requires:
Domain Context file
Domain Adapter
Domain Context
/domain/contexts/new-application/minicex-request.ts
domain context file in same directory as context file of aggregate root it belongs to
in this example, minicex.ts is in /domain/contexts/new-application/ so minicex-request.ts is also in new-application/ directory
Domain Adapter
domain adapter in same file as domain adapter of aggregate root
if too many adapters in one file, can split out into multiple files as needed
in this example, MinicexRequestDomainAdapter goes in minicex.domain-adapter.ts
Note: argument in constructor is called props instead of doc
Last updated