AbstractThe Data Transfer Object (I-prefix) this model serializes to.
the Document-store Object (DB-prefix) this model serializes to.
ProtectedconstructorConstructs the base PersistentObject object using an optional IPersistentObject object, and an optional prefix to auto-assign a unique ID during runtime.
If obj, or any of its required fields are undefined, the default value of each property's type
will be used to construct the object.
The Data Transfer Object (I-prefix) this model serializes to.
the Document-store Object (DB-prefix) this model serializes to.
Optionalobj: Partial<IPersistentObject>
Data to construct the object from.
OptionaldefaultPrefix: string
The prefix to use when assigning a unique ID, in the case the id field is not present in obj.
AbstractcopyReturns a deep copy of this instance.
AbstracttoReturns the document-store representation of this object.
Unlike toJSON(), the resulting document-store representation may be in a significantly different
shape to that of its implementing class, and it cannot be passed back into the constructor to
reconstruct an equivalent instance.
Use fromDB() instead, which reconstructs the instance and rehydrates any fields truncated by the conversion.
AbstracttoReturns the JSON-serializable representation of this object.
The result can be passed back into the constructor to reconstruct an equivalent instance.
ProtectedtoSerializes the properties of this base class to an object.
Concrete subclasses should spread the result into their own toDB() implementations.
ProtectedtoSerializes the properties of this base class to an object.
Concrete subclasses should spread the result into their own toJSON() implementations.
The unique reference to this object in persistent storage.
The time the object was created, as an ISO 8601 (RFC 3339) timestamp.
An ID associated with the object.
Protected StaticindexAn auto-incremented index to keep object IDs unique during runtime.
The time the object was last updated, as an ISO 8601 (RFC 3339) timestamp.
Models that are stored into persistent repositories.
Can be filtered using PersistentObjectFilter.