Table of Contents

Class CurrencyLedgerService

Namespace
FishMMO.Database.Npgsql.Services
Assembly
FishMMO-DB.dll

Appends completed currency movements to the economy ledger.

public sealed class CurrencyLedgerService : BaseService<CurrencyLedgerEntity>, ICurrencyLedgerService
Inheritance
CurrencyLedgerService
Implements
Inherited Members

Constructors

CurrencyLedgerService(INpgsqlDbContextFactory)

public CurrencyLedgerService(INpgsqlDbContextFactory dbContextFactory)

Parameters

dbContextFactory INpgsqlDbContextFactory

Methods

RecordAsync(long, long, int, int, CancellationToken)

Appends one completed movement.

public Task<DatabaseResult> RecordAsync(long characterID, long amount, int reason, int state, CancellationToken cancellationToken = default)

Parameters

characterID long

The character whose balance moved.

amount long

Amount moved. Must be positive.

reason int

Maps to FishMMO.Shared.CurrencyMovementReason.

state int

Maps to FishMMO.Shared.CurrencyMovementState. Absorbed or Returned.

cancellationToken CancellationToken

Returns

Task<DatabaseResult>