Entity
If the cosmos db interface extends SubdocumentBase, it is an Entity on domain side
Cosmos DB Model
export interface PhysicianLicense extends SubdocumentBase {Domain Context
import { Entity, EntityProps } from "../../shared/entity";
import { DomainExecutionContext } from "../context";
export interface PhysicianLicenseProps extends EntityProps {
// Add fields according to the model
}
export interface PhysicianLicenseEntityReference extends Readonly<PhysicianLicenseProps> {}
export class PhysicianLicense<props extends PhysicianLicenseProps>
extends Entity<props> implements PhysicianLicenseEntityReference {
constructor(props: props, private readonly context: DomainExecutionContext) {
super(props);
}
// Add getters and setters for the field that was mentioned/defined above
}Domain Adapter
Last updated
Was this helpful?