btcpayserver/BTCPayServer/Data/StoreData.cs

82 lines
1.6 KiB
C#
Raw Normal View History

using BTCPayServer.Models;
2017-10-20 14:06:37 -05:00
using BTCPayServer.Services.Invoices;
using NBitcoin;
using NBXplorer;
2017-09-13 15:47:34 +09:00
using System;
using System.Collections.Generic;
2017-09-13 23:50:36 +09:00
using System.ComponentModel.DataAnnotations.Schema;
2017-09-13 15:47:34 +09:00
using System.Linq;
using System.Text;
2017-09-13 15:47:34 +09:00
using System.Threading.Tasks;
namespace BTCPayServer.Data
{
public class StoreData
{
public string Id
{
get;
set;
}
2017-09-13 15:47:34 +09:00
public List<UserStore> UserStores
{
get; set;
}
2017-09-13 15:47:34 +09:00
public string DerivationStrategy
{
get; set;
}
2017-09-13 15:47:34 +09:00
public string StoreName
{
get; set;
}
2017-09-13 15:47:34 +09:00
public SpeedPolicy SpeedPolicy
{
get; set;
}
2017-09-13 15:47:34 +09:00
public string StoreWebsite
{
get; set;
}
2017-09-13 15:47:34 +09:00
public byte[] StoreCertificate
{
get; set;
}
2017-09-13 23:50:36 +09:00
[NotMapped]
public string Role
{
get; set;
}
public byte[] StoreBlob
{
get;
set;
}
public StoreBlob GetStoreBlob(Network network)
{
return StoreBlob == null ? new StoreBlob() : new Serializer(network).ToObject<StoreBlob>(Encoding.UTF8.GetString(StoreBlob));
}
public void SetStoreBlob(StoreBlob storeBlob, Network network)
{
StoreBlob = Encoding.UTF8.GetBytes(new Serializer(network).ToString(storeBlob));
}
}
public class StoreBlob
{
public bool NetworkFeeDisabled
{
get; set;
}
}
2017-09-13 15:47:34 +09:00
}