feat(core): extend balance model to store currency code
This commit is contained in:
@@ -5,17 +5,23 @@ public sealed class Balance : Entity
|
||||
public Guid AccountId { get; init; }
|
||||
public decimal Current { get; init; }
|
||||
public decimal Available { get; init; }
|
||||
public string CurrencyCode { get; init; } = string.Empty;
|
||||
|
||||
private Balance()
|
||||
{
|
||||
}
|
||||
|
||||
public static Balance From(decimal current, decimal available)
|
||||
public static Balance From(
|
||||
decimal current,
|
||||
decimal available,
|
||||
string currencyCode
|
||||
)
|
||||
{
|
||||
return new()
|
||||
{
|
||||
Current = current,
|
||||
Available = available,
|
||||
CurrencyCode = currencyCode,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user