btcpayserver/BTCPayServer/Storage/Models/StorageSettings.cs

20 lines
560 B
C#
Raw Normal View History

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; }
2020-06-28 17:55:27 +09:00
[NotMapped]
public JObject Configuration
{
get => JsonConvert.DeserializeObject<JObject>(string.IsNullOrEmpty(ConfigurationStr) ? "{}" : ConfigurationStr);
set => ConfigurationStr = value.ToString();
}
}
}