The account's address. An address typically refers to a
human-readable series of 39 characters, starting either with
a T
, for TESTNET addresses, or with a N
, for MAINNET addresses.
This field is required, indexed and values are expected
to be unique.
This field contains the mongo collection name for entries
that are stored using AccountDocument or the model
AccountModel.
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 optional and indexed.
The account's first identified transaction date. Typically, this
field will contain the timestamp of the first transaction to the dApp
that was issued with this account.
This field is optional and indexed.
The account's first identified transaction block. Typically, this
field will contain the block height of the first transaction to the dApp
that was issued with this account.
This field is optional and not indexed.
The account's referral code. This code should be used when inviting
new users to the dApp. This field contains a unique random string of
8 characters.
This field is required, indexed and values are expected
to be unique.
The account's referrer address. This address refers to the
account that invited the current account to the dApp.
This field is optional and indexed.
The account's total transactions count. Typically, this field
will contain the number of transactions an account has done with
a particular dApp.
Caution: This field does not represent the total number of
transactions that an account has done during its entire lifecycle.
This field is optional and not indexed.
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 dynamic property permits to use the accounts
documents as a
source for payouts as is required in the Subjectable concern.
Note that the slug is always the account address because account
addresses are already unique.
This method implements a specialized query format to query items
individually, as documents, in the collection: accounts
.
The individual document data that is used in a query.
This static method populates a AccountDTO object from the values of a AccountDocument 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
accounts
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.3.0