Value Object
If the cosmos db interface extends NestedPath, it is a Value Object on domain side
Cosmos DB Model
export interface MinicexRequest extends NestedPath {Domain Context
import { ValueObject, ValueObjectProps } from "../../shared/value-object";
import { DomainExecutionContext } from "../context";
export interface MinicexRequestProps extends ValueObjectProps{
// Add fields according to the model
}
export interface MinicexRequestEntityReference extends Readonly<MinicexRequestProps> {}
export class MinicexRequest
extends ValueObject<MinicexRequestProps> implements MinicexRequestEntityReference {
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?