Interface ICurrencyLedgerService
- Namespace
- FishMMO.Database.Npgsql.Services.Interfaces
- Assembly
- FishMMO-DB.dll
Records completed currency movements.
public interface ICurrencyLedgerService
Remarks
Append-only. A movement is recorded after its balance change has been persisted and its outcome is known, so there is nothing to settle afterwards and no state for a later pass to interpret. A lost row is a gap in reporting, never a gap in the economy.
Methods
RecordAsync(long, long, int, int, CancellationToken)
Appends one completed movement.
Task<DatabaseResult> RecordAsync(long characterID, long amount, int reason, int state, CancellationToken cancellationToken = default)
Parameters
characterIDlongThe character whose balance moved.
amountlongAmount moved. Must be positive.
reasonintMaps to FishMMO.Shared.CurrencyMovementReason.
stateintMaps to FishMMO.Shared.CurrencyMovementState. Absorbed or Returned.
cancellationTokenCancellationToken