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(string.IsNullOrEmpty(ConfigurationStr) ? "{}" : ConfigurationStr); set => ConfigurationStr = value.ToString(); } } }