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 Guid AccountId { get; init; }
|
||||||
public decimal Current { get; init; }
|
public decimal Current { get; init; }
|
||||||
public decimal Available { get; init; }
|
public decimal Available { get; init; }
|
||||||
|
public string CurrencyCode { get; init; } = string.Empty;
|
||||||
|
|
||||||
private Balance()
|
private Balance()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Balance From(decimal current, decimal available)
|
public static Balance From(
|
||||||
|
decimal current,
|
||||||
|
decimal available,
|
||||||
|
string currencyCode
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Current = current,
|
Current = current,
|
||||||
Available = available,
|
Available = available,
|
||||||
|
CurrencyCode = currencyCode,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user