This field contains the mongo collection name for entries
that are stored using StateDocument or the model
StateModel.
Note that this field is not part of document properties
and used only internally to perform queries that refer to
an individual collection name, e.g. $unionWith
.
The document's creation timestamp. This field does not reflect the
date of creation of an account but rather the date of creation of the
cached database entry.
This field is required and indexed.
The state cache document's actual data. Note that this field
is poorly typed and can contain any object, the reason for
this is to be flexible about state caches for the beginning, in a
later iteration of the framework it is possible that this field
would be updated to a strictly typed alternative.
This field is required and indexed.
The state cache document's name. Note that this field must
contain dynamic module names, e.g. "discovery"
or `"payout",
such that state cache for each individual module can be tracked
accordingly.
This field is required, indexed and values are expected
to be unique.
The document's update timestamp. This field does not reflect the
date of update of an account but rather the date of update of the
cached database entry.
This field is optional and not indexed.
This method implements a specialized query format to query items
individually, as documents, in the collection: states
.
The individual document data that is used in a query.
This static method populates a StateDTO object from the values of a StateDocument as presented by mongoose queries.
The document as received from mongoose.
The DTO object that will be populated with values.
The dto
object with fields set.
Generated using TypeDoc
This class defines the exact fields that are stored in the corresponding MongoDB documents. It should be used whenever database documents are being handled or read for the
states
collection.Note that this class uses the generic Transferable trait to enable a
toDTO()
method on the model.Timestamp fields should be numbers to avoid timezone issues.
v0.2.0