// using System; using BTCPayServer.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace BTCPayServer.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "6.0.1"); modelBuilder.Entity("BTCPayServer.Data.AddressInvoiceData", b => { b.Property("Address") .HasColumnType("TEXT"); b.Property("CreatedTime") .HasColumnType("TEXT"); b.Property("InvoiceDataId") .HasColumnType("TEXT"); b.HasKey("Address"); b.HasIndex("InvoiceDataId"); b.ToTable("AddressInvoices"); }); modelBuilder.Entity("BTCPayServer.Data.APIKeyData", b => { b.Property("Id") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Label") .HasColumnType("TEXT"); b.Property("StoreId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("StoreId"); b.HasIndex("UserId"); b.ToTable("ApiKeys"); }); modelBuilder.Entity("BTCPayServer.Data.AppData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AppType") .HasColumnType("TEXT"); b.Property("Created") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Settings") .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.Property("TagAllInvoices") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("StoreDataId"); b.ToTable("Apps"); }); modelBuilder.Entity("BTCPayServer.Data.ApplicationUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Created") .HasColumnType("TEXT"); b.Property("DisabledNotifications") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); b.Property("LockoutEnabled") .HasColumnType("INTEGER"); b.Property("LockoutEnd") .HasColumnType("TEXT"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PasswordHash") .HasColumnType("TEXT"); b.Property("PhoneNumber") .HasColumnType("TEXT"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("RequiresEmailConfirmation") .HasColumnType("INTEGER"); b.Property("SecurityStamp") .HasColumnType("TEXT"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("BTCPayServer.Data.CustodianAccountData", b => { b.Property("Id") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("CustodianCode") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("StoreId") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("StoreId"); b.ToTable("CustodianAccount"); }); modelBuilder.Entity("BTCPayServer.Data.Data.PayoutProcessorData", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("PaymentMethod") .HasColumnType("TEXT"); b.Property("Processor") .HasColumnType("TEXT"); b.Property("StoreId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("StoreId"); b.ToTable("PayoutProcessors"); }); modelBuilder.Entity("BTCPayServer.Data.Fido2Credential", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ApplicationUserId") .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ApplicationUserId"); b.ToTable("Fido2Credentials"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Archived") .HasColumnType("INTEGER"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Created") .HasColumnType("TEXT"); b.Property("CurrentRefundId") .HasColumnType("TEXT"); b.Property("CustomerEmail") .HasColumnType("TEXT"); b.Property("ExceptionStatus") .HasColumnType("TEXT"); b.Property("ItemCode") .HasColumnType("TEXT"); b.Property("OrderId") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Created"); b.HasIndex("OrderId"); b.HasIndex("StoreDataId"); b.HasIndex("Id", "CurrentRefundId"); b.ToTable("Invoices"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceEventData", b => { b.Property("InvoiceDataId") .HasColumnType("TEXT"); b.Property("UniqueId") .HasColumnType("TEXT"); b.Property("Message") .HasColumnType("TEXT"); b.Property("Severity") .HasColumnType("INTEGER"); b.Property("Timestamp") .HasColumnType("TEXT"); b.HasKey("InvoiceDataId", "UniqueId"); b.ToTable("InvoiceEvents"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceSearchData", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasAnnotation("MySql:ValueGeneratedOnAdd", true) .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .HasAnnotation("Sqlite:Autoincrement", true); b.Property("InvoiceDataId") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("InvoiceDataId"); b.HasIndex("Value"); b.ToTable("InvoiceSearches"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceWebhookDeliveryData", b => { b.Property("InvoiceId") .HasColumnType("TEXT"); b.Property("DeliveryId") .HasColumnType("TEXT"); b.HasKey("InvoiceId", "DeliveryId"); b.HasIndex("DeliveryId") .IsUnique(); b.HasIndex("InvoiceId") .IsUnique(); b.ToTable("InvoiceWebhookDeliveries"); }); modelBuilder.Entity("BTCPayServer.Data.LightningAddressData", b => { b.Property("Username") .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("StoreDataId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Username"); b.HasIndex("StoreDataId"); b.ToTable("LightningAddresses"); }); modelBuilder.Entity("BTCPayServer.Data.NotificationData", b => { b.Property("Id") .HasMaxLength(36) .HasColumnType("TEXT"); b.Property("ApplicationUserId") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Created") .HasColumnType("TEXT"); b.Property("NotificationType") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Seen") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ApplicationUserId"); b.ToTable("Notifications"); }); modelBuilder.Entity("BTCPayServer.Data.OffchainTransactionData", b => { b.Property("Id") .HasMaxLength(64) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.HasKey("Id"); b.ToTable("OffchainTransactions"); }); modelBuilder.Entity("BTCPayServer.Data.PairedSINData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Label") .HasColumnType("TEXT"); b.Property("PairingTime") .HasColumnType("TEXT"); b.Property("SIN") .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("SIN"); b.HasIndex("StoreDataId"); b.ToTable("PairedSINData"); }); modelBuilder.Entity("BTCPayServer.Data.PairingCodeData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("DateCreated") .HasColumnType("TEXT"); b.Property("Expiration") .HasColumnType("TEXT"); b.Property("Facade") .HasColumnType("TEXT"); b.Property("Label") .HasColumnType("TEXT"); b.Property("SIN") .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.Property("TokenValue") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PairingCodes"); }); modelBuilder.Entity("BTCPayServer.Data.PayjoinLock", b => { b.Property("Id") .HasMaxLength(100) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PayjoinLocks"); }); modelBuilder.Entity("BTCPayServer.Data.PaymentData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Accounted") .HasColumnType("INTEGER"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("InvoiceDataId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("InvoiceDataId"); b.ToTable("Payments"); }); modelBuilder.Entity("BTCPayServer.Data.PaymentRequestData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Archived") .HasColumnType("INTEGER"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Created") .ValueGeneratedOnAdd() .HasColumnType("TEXT") .HasDefaultValue(new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0))); b.Property("Status") .HasColumnType("INTEGER"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Status"); b.HasIndex("StoreDataId"); b.ToTable("PaymentRequests"); }); modelBuilder.Entity("BTCPayServer.Data.PayoutData", b => { b.Property("Id") .HasMaxLength(30) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Date") .HasColumnType("TEXT"); b.Property("Destination") .HasColumnType("TEXT"); b.Property("PaymentMethodId") .IsRequired() .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("Proof") .HasColumnType("BLOB"); b.Property("PullPaymentDataId") .HasColumnType("TEXT"); b.Property("State") .IsRequired() .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("PullPaymentDataId"); b.HasIndex("State"); b.HasIndex("StoreDataId"); b.HasIndex("Destination", "State"); b.ToTable("Payouts"); }); modelBuilder.Entity("BTCPayServer.Data.PendingInvoiceData", b => { b.Property("Id") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PendingInvoices"); }); modelBuilder.Entity("BTCPayServer.Data.PlannedTransaction", b => { b.Property("Id") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("BroadcastAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PlannedTransactions"); }); modelBuilder.Entity("BTCPayServer.Data.PullPaymentData", b => { b.Property("Id") .HasMaxLength(30) .HasColumnType("TEXT"); b.Property("Archived") .HasColumnType("INTEGER"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("EndDate") .HasColumnType("TEXT"); b.Property("Period") .HasColumnType("INTEGER"); b.Property("StartDate") .HasColumnType("TEXT"); b.Property("StoreId") .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("StoreId"); b.ToTable("PullPayments"); }); modelBuilder.Entity("BTCPayServer.Data.RefundData", b => { b.Property("InvoiceDataId") .HasColumnType("TEXT"); b.Property("PullPaymentDataId") .HasMaxLength(30) .HasColumnType("TEXT"); b.HasKey("InvoiceDataId", "PullPaymentDataId"); b.HasIndex("PullPaymentDataId"); b.ToTable("Refunds"); }); modelBuilder.Entity("BTCPayServer.Data.SettingData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Settings"); }); modelBuilder.Entity("BTCPayServer.Data.StoreData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("DefaultCrypto") .HasColumnType("TEXT"); b.Property("DerivationStrategies") .HasColumnType("TEXT"); b.Property("DerivationStrategy") .HasColumnType("TEXT"); b.Property("SpeedPolicy") .HasColumnType("INTEGER"); b.Property("StoreBlob") .HasColumnType("BLOB"); b.Property("StoreCertificate") .HasColumnType("BLOB"); b.Property("StoreName") .HasColumnType("TEXT"); b.Property("StoreWebsite") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Stores"); }); modelBuilder.Entity("BTCPayServer.Data.StoredFile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ApplicationUserId") .HasColumnType("TEXT"); b.Property("FileName") .HasColumnType("TEXT"); b.Property("StorageFileName") .HasColumnType("TEXT"); b.Property("Timestamp") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ApplicationUserId"); b.ToTable("Files"); }); modelBuilder.Entity("BTCPayServer.Data.StoreSettingData", b => { b.Property("StoreId") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("StoreId", "Name"); b.ToTable("StoreSettings"); }); modelBuilder.Entity("BTCPayServer.Data.StoreWebhookData", b => { b.Property("StoreId") .HasColumnType("TEXT"); b.Property("WebhookId") .HasColumnType("TEXT"); b.HasKey("StoreId", "WebhookId"); b.HasIndex("StoreId") .IsUnique(); b.HasIndex("WebhookId") .IsUnique(); b.ToTable("StoreWebhooks"); }); modelBuilder.Entity("BTCPayServer.Data.U2FDevice", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ApplicationUserId") .HasColumnType("TEXT"); b.Property("AttestationCert") .IsRequired() .HasColumnType("BLOB"); b.Property("Counter") .HasColumnType("INTEGER"); b.Property("KeyHandle") .IsRequired() .HasColumnType("BLOB"); b.Property("Name") .HasColumnType("TEXT"); b.Property("PublicKey") .IsRequired() .HasColumnType("BLOB"); b.HasKey("Id"); b.HasIndex("ApplicationUserId"); b.ToTable("U2FDevices"); }); modelBuilder.Entity("BTCPayServer.Data.UserStore", b => { b.Property("ApplicationUserId") .HasColumnType("TEXT"); b.Property("StoreDataId") .HasColumnType("TEXT"); b.Property("Role") .HasColumnType("TEXT"); b.HasKey("ApplicationUserId", "StoreDataId"); b.HasIndex("StoreDataId"); b.ToTable("UserStore"); }); modelBuilder.Entity("BTCPayServer.Data.WalletData", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.HasKey("Id"); b.ToTable("Wallets"); }); modelBuilder.Entity("BTCPayServer.Data.WalletTransactionData", b => { b.Property("WalletDataId") .HasColumnType("TEXT"); b.Property("TransactionId") .HasColumnType("TEXT"); b.Property("Blob") .HasColumnType("BLOB"); b.Property("Labels") .HasColumnType("TEXT"); b.HasKey("WalletDataId", "TransactionId"); b.ToTable("WalletTransactions"); }); modelBuilder.Entity("BTCPayServer.Data.WebhookData", b => { b.Property("Id") .HasMaxLength(25) .HasColumnType("TEXT"); b.Property("Blob") .IsRequired() .HasColumnType("BLOB"); b.HasKey("Id"); b.ToTable("Webhooks"); }); modelBuilder.Entity("BTCPayServer.Data.WebhookDeliveryData", b => { b.Property("Id") .HasMaxLength(25) .HasColumnType("TEXT"); b.Property("Blob") .IsRequired() .HasColumnType("BLOB"); b.Property("Timestamp") .HasColumnType("TEXT"); b.Property("WebhookId") .IsRequired() .HasMaxLength(25) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("WebhookId"); b.ToTable("WebhookDeliveries"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("RoleId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("ProviderKey") .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("BTCPayServer.Data.AddressInvoiceData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("AddressInvoices") .HasForeignKey("InvoiceDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("InvoiceData"); }); modelBuilder.Entity("BTCPayServer.Data.APIKeyData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("APIKeys") .HasForeignKey("StoreId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("BTCPayServer.Data.ApplicationUser", "User") .WithMany("APIKeys") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("StoreData"); b.Navigation("User"); }); modelBuilder.Entity("BTCPayServer.Data.AppData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("Apps") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.CustodianAccountData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("CustodianAccounts") .HasForeignKey("StoreId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.Data.PayoutProcessorData", b => { b.HasOne("BTCPayServer.Data.StoreData", "Store") .WithMany("PayoutProcessors") .HasForeignKey("StoreId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("Store"); }); modelBuilder.Entity("BTCPayServer.Data.Fido2Credential", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") .WithMany("Fido2Credentials") .HasForeignKey("ApplicationUserId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("Invoices") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("BTCPayServer.Data.RefundData", "CurrentRefund") .WithMany() .HasForeignKey("Id", "CurrentRefundId"); b.Navigation("CurrentRefund"); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceEventData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("Events") .HasForeignKey("InvoiceDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("InvoiceData"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceSearchData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("InvoiceSearchData") .HasForeignKey("InvoiceDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("InvoiceData"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceWebhookDeliveryData", b => { b.HasOne("BTCPayServer.Data.WebhookDeliveryData", "Delivery") .WithOne() .HasForeignKey("BTCPayServer.Data.InvoiceWebhookDeliveryData", "DeliveryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BTCPayServer.Data.InvoiceData", "Invoice") .WithOne() .HasForeignKey("BTCPayServer.Data.InvoiceWebhookDeliveryData", "InvoiceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Delivery"); b.Navigation("Invoice"); }); modelBuilder.Entity("BTCPayServer.Data.LightningAddressData", b => { b.HasOne("BTCPayServer.Data.StoreData", "Store") .WithMany("LightningAddresses") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Store"); }); modelBuilder.Entity("BTCPayServer.Data.NotificationData", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") .WithMany("Notifications") .HasForeignKey("ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("BTCPayServer.Data.PairedSINData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("PairedSINs") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.PaymentData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("Payments") .HasForeignKey("InvoiceDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("InvoiceData"); }); modelBuilder.Entity("BTCPayServer.Data.PaymentRequestData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("PaymentRequests") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.PayoutData", b => { b.HasOne("BTCPayServer.Data.PullPaymentData", "PullPaymentData") .WithMany("Payouts") .HasForeignKey("PullPaymentDataId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("Payouts") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("PullPaymentData"); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.PendingInvoiceData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("PendingInvoices") .HasForeignKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("InvoiceData"); }); modelBuilder.Entity("BTCPayServer.Data.PullPaymentData", b => { b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("PullPayments") .HasForeignKey("StoreId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.RefundData", b => { b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") .WithMany("Refunds") .HasForeignKey("InvoiceDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BTCPayServer.Data.PullPaymentData", "PullPaymentData") .WithMany() .HasForeignKey("PullPaymentDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("InvoiceData"); b.Navigation("PullPaymentData"); }); modelBuilder.Entity("BTCPayServer.Data.StoredFile", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") .WithMany("StoredFiles") .HasForeignKey("ApplicationUserId"); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("BTCPayServer.Data.StoreSettingData", b => { b.HasOne("BTCPayServer.Data.StoreData", "Store") .WithMany("Settings") .HasForeignKey("StoreId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Store"); }); modelBuilder.Entity("BTCPayServer.Data.StoreWebhookData", b => { b.HasOne("BTCPayServer.Data.StoreData", "Store") .WithOne() .HasForeignKey("BTCPayServer.Data.StoreWebhookData", "StoreId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BTCPayServer.Data.WebhookData", "Webhook") .WithOne() .HasForeignKey("BTCPayServer.Data.StoreWebhookData", "WebhookId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Store"); b.Navigation("Webhook"); }); modelBuilder.Entity("BTCPayServer.Data.U2FDevice", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") .WithMany("U2FDevices") .HasForeignKey("ApplicationUserId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("BTCPayServer.Data.UserStore", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") .WithMany("UserStores") .HasForeignKey("ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BTCPayServer.Data.StoreData", "StoreData") .WithMany("UserStores") .HasForeignKey("StoreDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); b.Navigation("StoreData"); }); modelBuilder.Entity("BTCPayServer.Data.WalletTransactionData", b => { b.HasOne("BTCPayServer.Data.WalletData", "WalletData") .WithMany("WalletTransactions") .HasForeignKey("WalletDataId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("WalletData"); }); modelBuilder.Entity("BTCPayServer.Data.WebhookDeliveryData", b => { b.HasOne("BTCPayServer.Data.WebhookData", "Webhook") .WithMany("Deliveries") .HasForeignKey("WebhookId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Webhook"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BTCPayServer.Data.ApplicationUser", null) .WithMany("UserRoles") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("BTCPayServer.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("BTCPayServer.Data.ApplicationUser", b => { b.Navigation("APIKeys"); b.Navigation("Fido2Credentials"); b.Navigation("Notifications"); b.Navigation("StoredFiles"); b.Navigation("U2FDevices"); b.Navigation("UserRoles"); b.Navigation("UserStores"); }); modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b => { b.Navigation("AddressInvoices"); b.Navigation("Events"); b.Navigation("InvoiceSearchData"); b.Navigation("Payments"); b.Navigation("PendingInvoices"); b.Navigation("Refunds"); }); modelBuilder.Entity("BTCPayServer.Data.PullPaymentData", b => { b.Navigation("Payouts"); }); modelBuilder.Entity("BTCPayServer.Data.StoreData", b => { b.Navigation("APIKeys"); b.Navigation("Apps"); b.Navigation("CustodianAccounts"); b.Navigation("Invoices"); b.Navigation("LightningAddresses"); b.Navigation("PairedSINs"); b.Navigation("PaymentRequests"); b.Navigation("PayoutProcessors"); b.Navigation("Payouts"); b.Navigation("PullPayments"); b.Navigation("Settings"); b.Navigation("UserStores"); }); modelBuilder.Entity("BTCPayServer.Data.WalletData", b => { b.Navigation("WalletTransactions"); }); modelBuilder.Entity("BTCPayServer.Data.WebhookData", b => { b.Navigation("Deliveries"); }); #pragma warning restore 612, 618 } } }