diff --git a/BTCPayServer.Data/Migrations/ApplicationDbContextModelSnapshot.cs b/BTCPayServer.Data/Migrations/ApplicationDbContextModelSnapshot.cs index cce629bc2..6aacb5462 100644 --- a/BTCPayServer.Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/BTCPayServer.Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -16,867 +16,867 @@ namespace BTCPayServer.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.1.11-servicing-32099"); - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationId"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50); - - b.Property("Properties"); - - b.Property("Scopes"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(25); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(450); - - b.Property("Type") - .IsRequired() - .HasMaxLength(25); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations"); - }); - - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationUserId"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(100); - - b.Property("ClientSecret"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50); - - b.Property("ConsentType"); - - b.Property("DisplayName"); - - b.Property("Permissions"); - - b.Property("PostLogoutRedirectUris"); - - b.Property("Properties"); - - b.Property("RedirectUris"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(25); - - b.HasKey("Id"); - - b.HasIndex("ApplicationUserId"); - - b.HasIndex("ClientId") - .IsUnique(); - - b.ToTable("OpenIddictApplications"); - }); - - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationId"); - - b.Property("AuthorizationId"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50); - - b.Property("CreationDate"); - - b.Property("ExpirationDate"); - - b.Property("Payload"); - - b.Property("Properties"); - - b.Property("ReferenceId") - .HasMaxLength(100); - - b.Property("Status") - .IsRequired() - .HasMaxLength(25); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(450); - - b.Property("Type") - .IsRequired() - .HasMaxLength(25); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId") - .IsUnique(); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens"); - }); - modelBuilder.Entity("BTCPayServer.Data.AddressInvoiceData", b => - { - b.Property("Address") - .ValueGeneratedOnAdd(); + { + b.Property("Address") + .ValueGeneratedOnAdd(); - b.Property("CreatedTime"); + b.Property("CreatedTime"); - b.Property("InvoiceDataId"); + b.Property("InvoiceDataId"); - b.HasKey("Address"); + b.HasKey("Address"); - b.HasIndex("InvoiceDataId"); + b.HasIndex("InvoiceDataId"); - b.ToTable("AddressInvoices"); - }); + b.ToTable("AddressInvoices"); + }); modelBuilder.Entity("BTCPayServer.Data.APIKeyData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasMaxLength(50); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(50); - b.Property("StoreId") - .HasMaxLength(50); + b.Property("StoreId") + .HasMaxLength(50); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StoreId"); + b.HasIndex("StoreId"); - b.ToTable("ApiKeys"); - }); + b.ToTable("ApiKeys"); + }); modelBuilder.Entity("BTCPayServer.Data.AppData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("AppType"); + b.Property("AppType"); - b.Property("Created"); + b.Property("Created"); - b.Property("Name"); + b.Property("Name"); - b.Property("Settings"); + b.Property("Settings"); - b.Property("StoreDataId"); + b.Property("StoreDataId"); - b.Property("TagAllInvoices"); + b.Property("TagAllInvoices"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StoreDataId"); + b.HasIndex("StoreDataId"); - b.ToTable("Apps"); - }); + b.ToTable("Apps"); + }); + + modelBuilder.Entity("BTCPayServer.Data.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("RequiresEmailConfirmation"); + + b.Property("SecurityStamp"); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationId"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50); + + b.Property("Properties"); + + b.Property("Scopes"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(25); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(450); + + b.Property("Type") + .IsRequired() + .HasMaxLength(25); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations"); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdClient", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(100); + + b.Property("ClientSecret"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50); + + b.Property("ConsentType"); + + b.Property("DisplayName"); + + b.Property("Permissions"); + + b.Property("PostLogoutRedirectUris"); + + b.Property("Properties"); + + b.Property("RedirectUris"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(25); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("OpenIddictApplications"); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationId"); + + b.Property("AuthorizationId"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50); + + b.Property("CreationDate"); + + b.Property("ExpirationDate"); + + b.Property("Payload"); + + b.Property("Properties"); + + b.Property("ReferenceId") + .HasMaxLength(100); + + b.Property("Status") + .IsRequired() + .HasMaxLength(25); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(450); + + b.Property("Type") + .IsRequired() + .HasMaxLength(25); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique(); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens"); + }); modelBuilder.Entity("BTCPayServer.Data.HistoricalAddressInvoiceData", b => - { - b.Property("InvoiceDataId"); + { + b.Property("InvoiceDataId"); - b.Property("Address"); + b.Property("Address"); - b.Property("Assigned"); + b.Property("Assigned"); - b.Property("CryptoCode"); + b.Property("CryptoCode"); - b.Property("UnAssigned"); + b.Property("UnAssigned"); - b.HasKey("InvoiceDataId", "Address"); + b.HasKey("InvoiceDataId", "Address"); - b.ToTable("HistoricalAddressInvoices"); - }); + b.ToTable("HistoricalAddressInvoices"); + }); modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Blob"); + b.Property("Blob"); - b.Property("Created"); + b.Property("Created"); - b.Property("CustomerEmail"); + b.Property("CustomerEmail"); - b.Property("ExceptionStatus"); + b.Property("ExceptionStatus"); - b.Property("ItemCode"); + b.Property("ItemCode"); - b.Property("OrderId"); + b.Property("OrderId"); - b.Property("Status"); + b.Property("Status"); - b.Property("StoreDataId"); + b.Property("StoreDataId"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StoreDataId"); + b.HasIndex("StoreDataId"); - b.ToTable("Invoices"); - }); + b.ToTable("Invoices"); + }); modelBuilder.Entity("BTCPayServer.Data.InvoiceEventData", b => - { - b.Property("InvoiceDataId"); + { + b.Property("InvoiceDataId"); - b.Property("UniqueId"); + b.Property("UniqueId"); - b.Property("Message"); + b.Property("Message"); - b.Property("Timestamp"); + b.Property("Timestamp"); - b.HasKey("InvoiceDataId", "UniqueId"); + b.HasKey("InvoiceDataId", "UniqueId"); - b.ToTable("InvoiceEvents"); - }); + b.ToTable("InvoiceEvents"); + }); modelBuilder.Entity("BTCPayServer.Data.PairedSINData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Label"); + b.Property("Label"); - b.Property("PairingTime"); + b.Property("PairingTime"); - b.Property("SIN"); + b.Property("SIN"); - b.Property("StoreDataId"); + b.Property("StoreDataId"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("SIN"); + b.HasIndex("SIN"); - b.HasIndex("StoreDataId"); + b.HasIndex("StoreDataId"); - b.ToTable("PairedSINData"); - }); + b.ToTable("PairedSINData"); + }); modelBuilder.Entity("BTCPayServer.Data.PairingCodeData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("DateCreated"); + b.Property("DateCreated"); - b.Property("Expiration"); + b.Property("Expiration"); - b.Property("Facade"); + b.Property("Facade"); - b.Property("Label"); + b.Property("Label"); - b.Property("SIN"); + b.Property("SIN"); - b.Property("StoreDataId"); + b.Property("StoreDataId"); - b.Property("TokenValue"); + b.Property("TokenValue"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("PairingCodes"); - }); + b.ToTable("PairingCodes"); + }); modelBuilder.Entity("BTCPayServer.Data.PaymentData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Accounted"); + b.Property("Accounted"); - b.Property("Blob"); + b.Property("Blob"); - b.Property("InvoiceDataId"); + b.Property("InvoiceDataId"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("InvoiceDataId"); + b.HasIndex("InvoiceDataId"); - b.ToTable("Payments"); - }); + b.ToTable("Payments"); + }); + + modelBuilder.Entity("BTCPayServer.Data.PaymentRequestData", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Blob"); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0))); + + b.Property("Status"); + + b.Property("StoreDataId"); + + b.HasKey("Id"); + + b.HasIndex("Status"); + + b.HasIndex("StoreDataId"); + + b.ToTable("PaymentRequests"); + }); modelBuilder.Entity("BTCPayServer.Data.PendingInvoiceData", b => - { - b.Property("Id"); + { + b.Property("Id"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("PendingInvoices"); - }); + b.ToTable("PendingInvoices"); + }); modelBuilder.Entity("BTCPayServer.Data.RefundAddressesData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Blob"); + b.Property("Blob"); - b.Property("InvoiceDataId"); + b.Property("InvoiceDataId"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("InvoiceDataId"); + b.HasIndex("InvoiceDataId"); - b.ToTable("RefundAddresses"); - }); + b.ToTable("RefundAddresses"); + }); modelBuilder.Entity("BTCPayServer.Data.SettingData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Value"); + b.Property("Value"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Settings"); - }); + b.ToTable("Settings"); + }); modelBuilder.Entity("BTCPayServer.Data.StoreData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("DefaultCrypto"); + b.Property("DefaultCrypto"); - b.Property("DerivationStrategies"); + b.Property("DerivationStrategies"); - b.Property("DerivationStrategy"); + b.Property("DerivationStrategy"); - b.Property("SpeedPolicy"); + b.Property("SpeedPolicy"); - b.Property("StoreBlob"); + b.Property("StoreBlob"); - b.Property("StoreCertificate"); + b.Property("StoreCertificate"); - b.Property("StoreName"); + b.Property("StoreName"); - b.Property("StoreWebsite"); + b.Property("StoreWebsite"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Stores"); - }); + b.ToTable("Stores"); + }); + + modelBuilder.Entity("BTCPayServer.Data.StoredFile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("FileName"); + + b.Property("StorageFileName"); + + b.Property("Timestamp"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("BTCPayServer.Data.U2FDevice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("AttestationCert") + .IsRequired(); + + b.Property("Counter"); + + b.Property("KeyHandle") + .IsRequired(); + + b.Property("Name"); + + b.Property("PublicKey") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("U2FDevices"); + }); modelBuilder.Entity("BTCPayServer.Data.UserStore", b => - { - b.Property("ApplicationUserId"); + { + b.Property("ApplicationUserId"); - b.Property("StoreDataId"); + b.Property("StoreDataId"); - b.Property("Role"); + b.Property("Role"); - b.HasKey("ApplicationUserId", "StoreDataId"); + b.HasKey("ApplicationUserId", "StoreDataId"); - b.HasIndex("StoreDataId"); + b.HasIndex("StoreDataId"); - b.ToTable("UserStore"); - }); + b.ToTable("UserStore"); + }); modelBuilder.Entity("BTCPayServer.Data.WalletData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("Blob"); + b.Property("Blob"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Wallets"); - }); + b.ToTable("Wallets"); + }); modelBuilder.Entity("BTCPayServer.Data.WalletTransactionData", b => - { - b.Property("WalletDataId"); + { + b.Property("WalletDataId"); - b.Property("TransactionId"); + b.Property("TransactionId"); - b.Property("Blob"); + b.Property("Blob"); - b.Property("Labels"); + b.Property("Labels"); - b.HasKey("WalletDataId", "TransactionId"); + b.HasKey("WalletDataId", "TransactionId"); - b.ToTable("WalletTransactions"); - }); - - modelBuilder.Entity("BTCPayServer.Models.ApplicationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("RequiresEmailConfirmation"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("BTCPayServer.Services.PaymentRequests.PaymentRequestData", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Blob"); - - b.Property("Created") - .ValueGeneratedOnAdd() - .HasDefaultValue(new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0))); - - b.Property("Status"); - - b.Property("StoreDataId"); - - b.HasKey("Id"); - - b.HasIndex("Status"); - - b.HasIndex("StoreDataId"); - - b.ToTable("PaymentRequests"); - }); - - modelBuilder.Entity("BTCPayServer.Services.U2F.Models.U2FDevice", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationUserId"); - - b.Property("AttestationCert") - .IsRequired(); - - b.Property("Counter"); - - b.Property("KeyHandle") - .IsRequired(); - - b.Property("Name"); - - b.Property("PublicKey") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("ApplicationUserId"); - - b.ToTable("U2FDevices"); - }); - - modelBuilder.Entity("BTCPayServer.Storage.Models.StoredFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationUserId"); - - b.Property("FileName"); - - b.Property("StorageFileName"); - - b.Property("Timestamp"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationUserId"); - - b.ToTable("Files"); - }); + b.ToTable("WalletTransactions"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); - b.Property("Name") - .HasMaxLength(256); + b.Property("Name") + .HasMaxLength(256); - b.Property("NormalizedName") - .HasMaxLength(256); + b.Property("NormalizedName") + .HasMaxLength(256); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); - b.ToTable("AspNetRoles"); - }); + b.ToTable("AspNetRoles"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ClaimType"); + b.Property("ClaimType"); - b.Property("ClaimValue"); + b.Property("ClaimValue"); - b.Property("RoleId") - .IsRequired(); + b.Property("RoleId") + .IsRequired(); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RoleId"); + b.HasIndex("RoleId"); - b.ToTable("AspNetRoleClaims"); - }); + b.ToTable("AspNetRoleClaims"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ClaimType"); + b.Property("ClaimType"); - b.Property("ClaimValue"); + b.Property("ClaimValue"); - b.Property("UserId") - .IsRequired(); + b.Property("UserId") + .IsRequired(); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("AspNetUserClaims"); - }); + b.ToTable("AspNetUserClaims"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); + { + b.Property("LoginProvider"); - b.Property("ProviderKey"); + b.Property("ProviderKey"); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName"); - b.Property("UserId") - .IsRequired(); + b.Property("UserId") + .IsRequired(); - b.HasKey("LoginProvider", "ProviderKey"); + b.HasKey("LoginProvider", "ProviderKey"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("AspNetUserLogins"); - }); + b.ToTable("AspNetUserLogins"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId"); + { + b.Property("UserId"); - b.Property("RoleId"); + b.Property("RoleId"); - b.HasKey("UserId", "RoleId"); + b.HasKey("UserId", "RoleId"); - b.HasIndex("RoleId"); + b.HasIndex("RoleId"); - b.ToTable("AspNetUserRoles"); - }); + b.ToTable("AspNetUserRoles"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); + { + b.Property("UserId"); - b.Property("LoginProvider"); + b.Property("LoginProvider"); - b.Property("Name"); + b.Property("Name"); - b.Property("Value"); + b.Property("Value"); - b.HasKey("UserId", "LoginProvider", "Name"); + b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AspNetUserTokens"); - }); + b.ToTable("AspNetUserTokens"); + }); modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50); + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50); - b.Property("Description"); + b.Property("Description"); - b.Property("DisplayName"); + b.Property("DisplayName"); - b.Property("Name") - .IsRequired() - .HasMaxLength(200); + b.Property("Name") + .IsRequired() + .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties"); - b.Property("Resources"); + b.Property("Resources"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Name") - .IsUnique(); + b.HasIndex("Name") + .IsUnique(); - b.ToTable("OpenIddictScopes"); - }); - - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdAuthorization", b => - { - b.HasOne("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdClient", "Application") - .WithMany("Authorizations") - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdClient", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser", "ApplicationUser") - .WithMany("OpenIdClients") - .HasForeignKey("ApplicationUserId"); - }); - - modelBuilder.Entity("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdToken", b => - { - b.HasOne("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdClient", "Application") - .WithMany("Tokens") - .HasForeignKey("ApplicationId"); - - b.HasOne("BTCPayServer.Authentication.OpenId.Models.BTCPayOpenIdAuthorization", "Authorization") - .WithMany("Tokens") - .HasForeignKey("AuthorizationId"); - }); + b.ToTable("OpenIddictScopes"); + }); modelBuilder.Entity("BTCPayServer.Data.AddressInvoiceData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("AddressInvoices") - .HasForeignKey("InvoiceDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("AddressInvoices") + .HasForeignKey("InvoiceDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.APIKeyData", b => - { - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("APIKeys") - .HasForeignKey("StoreId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("APIKeys") + .HasForeignKey("StoreId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.AppData", b => - { - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("Apps") - .HasForeignKey("StoreDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("Apps") + .HasForeignKey("StoreDataId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdAuthorization", b => + { + b.HasOne("BTCPayServer.Data.BTCPayOpenIdClient", "Application") + .WithMany("Authorizations") + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdClient", b => + { + b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") + .WithMany("OpenIdClients") + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("BTCPayServer.Data.BTCPayOpenIdToken", b => + { + b.HasOne("BTCPayServer.Data.BTCPayOpenIdClient", "Application") + .WithMany("Tokens") + .HasForeignKey("ApplicationId"); + + b.HasOne("BTCPayServer.Data.BTCPayOpenIdAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + }); modelBuilder.Entity("BTCPayServer.Data.HistoricalAddressInvoiceData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("HistoricalAddressInvoices") - .HasForeignKey("InvoiceDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("HistoricalAddressInvoices") + .HasForeignKey("InvoiceDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b => - { - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("Invoices") - .HasForeignKey("StoreDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("Invoices") + .HasForeignKey("StoreDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.InvoiceEventData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("Events") - .HasForeignKey("InvoiceDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("Events") + .HasForeignKey("InvoiceDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.PairedSINData", b => - { - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("PairedSINs") - .HasForeignKey("StoreDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("PairedSINs") + .HasForeignKey("StoreDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.PaymentData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("Payments") - .HasForeignKey("InvoiceDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("Payments") + .HasForeignKey("InvoiceDataId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("BTCPayServer.Data.PaymentRequestData", b => + { + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("PaymentRequests") + .HasForeignKey("StoreDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.PendingInvoiceData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("PendingInvoices") - .HasForeignKey("Id") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("PendingInvoices") + .HasForeignKey("Id") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.RefundAddressesData", b => - { - b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") - .WithMany("RefundAddresses") - .HasForeignKey("InvoiceDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.InvoiceData", "InvoiceData") + .WithMany("RefundAddresses") + .HasForeignKey("InvoiceDataId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("BTCPayServer.Data.StoredFile", b => + { + b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") + .WithMany("StoredFiles") + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("BTCPayServer.Data.U2FDevice", b => + { + b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") + .WithMany("U2FDevices") + .HasForeignKey("ApplicationUserId"); + }); modelBuilder.Entity("BTCPayServer.Data.UserStore", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser", "ApplicationUser") - .WithMany("UserStores") - .HasForeignKey("ApplicationUserId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("BTCPayServer.Data.ApplicationUser", "ApplicationUser") + .WithMany("UserStores") + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("UserStores") - .HasForeignKey("StoreDataId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("BTCPayServer.Data.StoreData", "StoreData") + .WithMany("UserStores") + .HasForeignKey("StoreDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("BTCPayServer.Data.WalletTransactionData", b => - { - b.HasOne("BTCPayServer.Data.WalletData", "WalletData") - .WithMany("WalletTransactions") - .HasForeignKey("WalletDataId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("BTCPayServer.Services.PaymentRequests.PaymentRequestData", b => - { - b.HasOne("BTCPayServer.Data.StoreData", "StoreData") - .WithMany("PaymentRequests") - .HasForeignKey("StoreDataId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("BTCPayServer.Services.U2F.Models.U2FDevice", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser", "ApplicationUser") - .WithMany("U2FDevices") - .HasForeignKey("ApplicationUserId"); - }); - - modelBuilder.Entity("BTCPayServer.Storage.Models.StoredFile", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser", "ApplicationUser") - .WithMany("StoredFiles") - .HasForeignKey("ApplicationUserId"); - }); + { + b.HasOne("BTCPayServer.Data.WalletData", "WalletData") + .WithMany("WalletTransactions") + .HasForeignKey("WalletDataId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("BTCPayServer.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("BTCPayServer.Data.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("BTCPayServer.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("BTCPayServer.Data.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); #pragma warning restore 612, 618 } }