2020-06-28 21:44:35 -05:00
|
|
|
using System;
|
2019-08-30 00:24:42 +09:00
|
|
|
using System.Collections.Generic;
|
2023-02-10 11:16:24 +09:00
|
|
|
using System.Text;
|
2020-05-23 21:13:18 +02:00
|
|
|
using BTCPayServer.Client.Models;
|
2022-11-28 20:36:18 +09:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
2023-02-10 11:16:24 +09:00
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
2024-04-04 16:31:04 +09:00
|
|
|
using Newtonsoft.Json.Linq;
|
2019-08-30 00:24:42 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Data
|
|
|
|
{
|
|
|
|
public class StoreData
|
|
|
|
{
|
2020-04-30 16:43:16 +02:00
|
|
|
public string Id { get; set; }
|
|
|
|
public List<UserStore> UserStores { get; set; }
|
|
|
|
|
|
|
|
public List<AppData> Apps { get; set; }
|
|
|
|
|
|
|
|
public List<PaymentRequestData> PaymentRequests { get; set; }
|
2019-08-30 00:24:42 +09:00
|
|
|
|
2020-06-24 10:34:09 +09:00
|
|
|
public List<PullPaymentData> PullPayments { get; set; }
|
|
|
|
|
2019-08-30 00:24:42 +09:00
|
|
|
public List<InvoiceData> Invoices { get; set; }
|
|
|
|
|
|
|
|
[Obsolete("Use GetDerivationStrategies instead")]
|
2020-04-30 16:43:16 +02:00
|
|
|
public string DerivationStrategy { get; set; }
|
2019-08-30 00:24:42 +09:00
|
|
|
|
2020-04-30 16:43:16 +02:00
|
|
|
public string DerivationStrategies { get; set; }
|
|
|
|
|
|
|
|
public string StoreName { get; set; }
|
|
|
|
|
|
|
|
public SpeedPolicy SpeedPolicy { get; set; } = SpeedPolicy.MediumSpeed;
|
|
|
|
|
|
|
|
public string StoreWebsite { get; set; }
|
|
|
|
|
|
|
|
public byte[] StoreCertificate { get; set; }
|
|
|
|
|
2022-11-28 20:36:18 +09:00
|
|
|
public string StoreBlob { get; set; }
|
2020-04-30 16:43:16 +02:00
|
|
|
|
2019-08-30 00:24:42 +09:00
|
|
|
[Obsolete("Use GetDefaultPaymentId instead")]
|
|
|
|
public string DefaultCrypto { get; set; }
|
2020-04-30 16:43:16 +02:00
|
|
|
|
2019-08-30 00:24:42 +09:00
|
|
|
public List<PairedSINData> PairedSINs { get; set; }
|
|
|
|
public IEnumerable<APIKeyData> APIKeys { get; set; }
|
2022-04-19 09:58:31 +02:00
|
|
|
public IEnumerable<LightningAddressData> LightningAddresses { get; set; }
|
2022-04-24 05:19:34 +02:00
|
|
|
public IEnumerable<PayoutProcessorData> PayoutProcessors { get; set; }
|
|
|
|
public IEnumerable<PayoutData> Payouts { get; set; }
|
2022-06-13 06:36:47 +02:00
|
|
|
public IEnumerable<StoreSettingData> Settings { get; set; }
|
2023-02-20 11:35:54 +01:00
|
|
|
public IEnumerable<FormData> Forms { get; set; }
|
2023-05-26 16:49:32 +02:00
|
|
|
public IEnumerable<StoreRole> StoreRoles { get; set; }
|
2023-09-11 02:59:17 +02:00
|
|
|
public bool Archived { get; set; }
|
2022-11-28 20:36:18 +09:00
|
|
|
|
|
|
|
internal static void OnModelCreating(ModelBuilder builder, DatabaseFacade databaseFacade)
|
|
|
|
{
|
2024-04-15 19:08:25 +09:00
|
|
|
builder.Entity<StoreData>()
|
|
|
|
.Property(o => o.StoreBlob)
|
|
|
|
.HasColumnType("JSONB");
|
|
|
|
|
|
|
|
builder.Entity<StoreData>()
|
|
|
|
.Property(o => o.DerivationStrategies)
|
|
|
|
.HasColumnType("JSONB");
|
2022-11-28 20:36:18 +09:00
|
|
|
}
|
2019-08-30 00:24:42 +09:00
|
|
|
}
|
|
|
|
}
|