classlib/ExpenseTracker.Domain/Enums/Currency.cs
2024-08-07 21:12:02 +03:00

38 lines
1.0 KiB
C#

namespace ExpenseTracker.Domain.Enums;
public abstract class Currency : Enumeration<Currency>
{
public static readonly Currency Default = new DefaultCurrency();
public static readonly Currency AUD = new AudCurrency();
public static readonly Currency USD = new UsdCurrency();
public static readonly Currency EUR = new EurCurrency();
public static readonly Currency UAH = new UahCurrency();
protected Currency(int value, string name) : base(value, name) { }
private sealed class DefaultCurrency : Currency
{
public DefaultCurrency() : base(0, "Default") { }
}
private sealed class AudCurrency : Currency
{
public AudCurrency() : base (036, "AUD") { }
}
private sealed class UsdCurrency : Currency
{
public UsdCurrency() : base(840, "USD") { }
}
private sealed class UahCurrency : Currency
{
public UahCurrency() : base(978, "UAH") { }
}
private sealed class EurCurrency : Currency
{
public EurCurrency() : base(980, "EUR") { }
}
}