use more concrete types for price type in app items

This commit is contained in:
Kukks
2021-10-11 12:46:05 +02:00
committed by Andrew Camilleri
parent 33a893ba31
commit 9592a77cff
11 changed files with 135 additions and 53 deletions

View File

@@ -9,15 +9,22 @@ namespace BTCPayServer.Models.AppViewModels
{
public class ItemPrice
{
public enum ItemPriceType
{
Topup,
Minimum,
Fixed
}
public ItemPriceType Type { get; set; }
public string Formatted { get; set; }
public decimal Value { get; set; }
public decimal? Value { get; set; }
}
public string Description { get; set; }
public string Id { get; set; }
public string Image { get; set; }
public ItemPrice Price { get; set; }
public string Title { get; set; }
public string Custom { get; set; }
public string BuyButtonText { get; set; }
public int? Inventory { get; set; } = null;
public string[] PaymentMethods { get; set; }