Skip to content

SudoSOS Back-end API / balance / Balance

Class: Balance ​

TypeORM entity for the balance table. This is a cache row -- the authoritative balance is recomputed from Transaction and Transfer history. lastTransaction and lastTransfer mark the cursor up to which amount is accurate; anything newer is summed on read by BalanceService.

Extends ​

Constructors ​

Constructor ​

ts
new Balance(): Balance;

Returns ​

Balance

Inherited from ​

BaseEntityWithoutId.constructor

Properties ​

PropertyModifierTypeDescriptionInherited from
amountreadonlyDinero--
createdAtreadonlyDateThe creation date of the object.BaseEntityWithoutId.createdAt
lastTransaction?readonlyTransactionThe last transaction of this user, used to calculate this balance-
lastTransfer?readonlyTransferThe last transfer of this user, used to calculate this balance-
updatedAtreadonlyDateThe last update date of the object.BaseEntityWithoutId.updatedAt
userreadonlyUser--
userIdreadonlynumber--
versionreadonlynumberThe current version of the object.BaseEntityWithoutId.version