Entity
If the cosmos db interface extends SubdocumentBase, it is an Entity on domain side
Cosmos DB Model
/infrastructure/data-sources/cosmos-db/models/physician.ts
Each entity requires:
Domain Context file
Domain Adapter
Domain Context
/domain/contexts/physician/physician-license.ts
domain context file in same directory as context file of aggregate root it belongs to
in this example, physician-license.ts is placed in contexts/physician/ directory alongside physician.ts context file
Domain Adapter
/domain/infrastructure/persistence/physician.domain-adapter.ts
domain adapter in same file as domain adapter of aggregate root
if too many adapters in one file, you can split out the domain adapters into multiple files as needed
in this example, PhysicianLicenseDomainAdapter goes in physician.domain-adapter.ts
Last updated