btcpayserver/BTCPayServer/Storage/Models/StorageSettings.cs
2021-03-06 13:36:36 +09:00

20 lines
558 B
C#

using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Storage.Models
{
public class StorageSettings
{
public StorageProvider Provider { get; set; }
public string ConfigurationStr { get; set; }
[JsonIgnore]
public JObject Configuration
{
get => JsonConvert.DeserializeObject<JObject>(string.IsNullOrEmpty(ConfigurationStr) ? "{}" : ConfigurationStr);
set => ConfigurationStr = value.ToString();
}
}
}