//
using System;
using System.Collections.Generic;
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", "8.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("BTCPayServer.Data.APIKeyData", b =>
{
b.Property("Id")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Label")
.HasColumnType("text");
b.Property("StoreId")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Type")
.HasColumnType("integer");
b.Property("UserId")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.HasIndex("StoreId");
b.HasIndex("UserId");
b.ToTable("ApiKeys");
});
modelBuilder.Entity("BTCPayServer.Data.AddressInvoiceData", b =>
{
b.Property("Address")
.HasColumnType("text");
b.Property("PaymentMethodId")
.HasColumnType("text");
b.Property("InvoiceDataId")
.HasColumnType("text");
b.HasKey("Address", "PaymentMethodId");
b.HasIndex("InvoiceDataId");
b.ToTable("AddressInvoices");
});
modelBuilder.Entity("BTCPayServer.Data.AppData", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("AppType")
.HasColumnType("text");
b.Property("Archived")
.HasColumnType("boolean");
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("Name")
.HasColumnType("text");
b.Property("Settings")
.HasColumnType("JSONB");
b.Property("StoreDataId")
.HasColumnType("text");
b.Property("TagAllInvoices")
.HasColumnType("boolean");
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("Approved")
.HasColumnType("boolean");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("DisabledNotifications")
.HasColumnType("text");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("EmailConfirmed")
.HasColumnType("boolean");
b.Property("LockoutEnabled")
.HasColumnType("boolean");
b.Property("LockoutEnd")
.HasColumnType("timestamp with time zone");
b.Property("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("PasswordHash")
.HasColumnType("text");
b.Property("PhoneNumber")
.HasColumnType("text");
b.Property("PhoneNumberConfirmed")
.HasColumnType("boolean");
b.Property("RequiresApproval")
.HasColumnType("boolean");
b.Property("RequiresEmailConfirmation")
.HasColumnType("boolean");
b.Property("SecurityStamp")
.HasColumnType("text");
b.Property("TwoFactorEnabled")
.HasColumnType("boolean");
b.Property("UserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("BTCPayServer.Data.CustomerData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("id");
b.Property("AdditionalData")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("additional_data")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamptz")
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property("ExternalRef")
.HasColumnType("text")
.HasColumnName("external_ref");
b.Property("Metadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("Name")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("name")
.HasDefaultValueSql("''::TEXT");
b.Property("StoreId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("store_id");
b.HasKey("Id");
b.HasIndex("StoreId", "ExternalRef")
.IsUnique();
b.ToTable("customers");
});
modelBuilder.Entity("BTCPayServer.Data.CustomerIdentityData", b =>
{
b.Property("CustomerId")
.HasColumnType("text")
.HasColumnName("customer_id");
b.Property("Type")
.HasColumnType("text")
.HasColumnName("type");
b.Property("Value")
.IsRequired()
.HasColumnType("text")
.HasColumnName("value");
b.HasKey("CustomerId", "Type");
b.ToTable("customers_identities");
});
modelBuilder.Entity("BTCPayServer.Data.EmailRuleData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property("Id"));
b.Property("AdditionalData")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("additional_data")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("BCC")
.IsRequired()
.HasColumnType("text[]")
.HasColumnName("bcc");
b.Property("Body")
.IsRequired()
.HasColumnType("text")
.HasColumnName("body");
b.Property("CC")
.IsRequired()
.HasColumnType("text[]")
.HasColumnName("cc");
b.Property("Condition")
.HasColumnType("text")
.HasColumnName("condition");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamptz")
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property("Metadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("OfferingId")
.HasColumnType("text")
.HasColumnName("offering_id");
b.Property("StoreId")
.HasColumnType("text")
.HasColumnName("store_id");
b.Property("Subject")
.IsRequired()
.HasColumnType("text")
.HasColumnName("subject");
b.Property("To")
.IsRequired()
.HasColumnType("text[]")
.HasColumnName("to");
b.Property("Trigger")
.IsRequired()
.HasColumnType("text")
.HasColumnName("trigger");
b.HasKey("Id");
b.HasIndex("OfferingId");
b.HasIndex("StoreId");
b.ToTable("email_rules");
});
modelBuilder.Entity("BTCPayServer.Data.Fido2Credential", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text");
b.Property("ApplicationUserId")
.HasColumnType("text");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Name")
.HasColumnType("text");
b.Property("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ApplicationUserId");
b.ToTable("Fido2Credentials");
});
modelBuilder.Entity("BTCPayServer.Data.FormData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text");
b.Property("Config")
.HasColumnType("JSONB");
b.Property("Name")
.HasColumnType("text");
b.Property("Public")
.HasColumnType("boolean");
b.Property("StoreId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("StoreId");
b.ToTable("Forms");
});
modelBuilder.Entity("BTCPayServer.Data.InvoiceData", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Amount")
.HasColumnType("NUMERIC");
b.Property("Archived")
.HasColumnType("boolean");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("Currency")
.HasColumnType("text");
b.Property("ExceptionStatus")
.HasColumnType("text");
b.Property("Status")
.HasColumnType("text");
b.Property("StoreDataId")
.HasColumnType("text");
b.Property("XMin")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("xid")
.HasColumnName("xmin");
b.HasKey("Id");
b.HasIndex("Created");
b.HasIndex("StoreDataId");
b.ToTable("Invoices");
});
modelBuilder.Entity("BTCPayServer.Data.InvoiceSearchData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("MySql:ValueGeneratedOnAdd", true)
.HasAnnotation("Sqlite:Autoincrement", true);
NpgsqlPropertyBuilderExtensions.UseSerialColumn(b.Property("Id"));
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("character varying(25)");
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("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
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("character varying(36)");
b.Property("ApplicationUserId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("NotificationType")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Seen")
.HasColumnType("boolean");
b.HasKey("Id");
b.HasIndex("ApplicationUserId");
b.ToTable("Notifications");
});
modelBuilder.Entity("BTCPayServer.Data.OffchainTransactionData", b =>
{
b.Property("Id")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property("Blob")
.HasColumnType("bytea");
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("timestamp with time zone");
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("timestamp with time zone");
b.Property("Expiration")
.HasColumnType("timestamp with time zone");
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("character varying(100)");
b.HasKey("Id");
b.ToTable("PayjoinLocks");
});
modelBuilder.Entity("BTCPayServer.Data.PaymentData", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("PaymentMethodId")
.HasColumnType("text");
b.Property("Accounted")
.HasColumnType("boolean");
b.Property("Amount")
.HasColumnType("NUMERIC");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("Currency")
.HasColumnType("text");
b.Property("InvoiceDataId")
.HasColumnType("text");
b.Property("Status")
.HasColumnType("text");
b.HasKey("Id", "PaymentMethodId");
b.HasIndex("InvoiceDataId");
b.ToTable("Payments");
});
modelBuilder.Entity("BTCPayServer.Data.PaymentRequestData", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Amount")
.HasColumnType("numeric");
b.Property("Archived")
.HasColumnType("boolean");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValue(new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
b.Property("Currency")
.HasColumnType("text");
b.Property("Expiry")
.HasColumnType("timestamp with time zone");
b.Property("ReferenceId")
.HasColumnType("text");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
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("character varying(30)");
b.Property("Amount")
.HasColumnType("numeric");
b.Property("Blob")
.HasColumnType("jsonb");
b.Property("Currency")
.HasColumnType("text");
b.Property("Date")
.HasColumnType("timestamp with time zone");
b.Property("DedupId")
.HasColumnType("text");
b.Property("OriginalAmount")
.HasColumnType("numeric");
b.Property("OriginalCurrency")
.HasColumnType("text");
b.Property("PayoutMethodId")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("Proof")
.HasColumnType("JSONB");
b.Property("PullPaymentDataId")
.HasColumnType("character varying(30)");
b.Property("State")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("StoreDataId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("PullPaymentDataId");
b.HasIndex("State");
b.HasIndex("StoreDataId");
b.HasIndex("DedupId", "State");
b.ToTable("Payouts");
});
modelBuilder.Entity("BTCPayServer.Data.PayoutProcessorData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("PayoutMethodId")
.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.PendingTransaction", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Blob2")
.HasColumnType("JSONB");
b.Property("CryptoCode")
.HasColumnType("text");
b.Property("Expiry")
.HasColumnType("timestamp with time zone");
b.Property("OutpointsUsed")
.HasColumnType("text[]");
b.Property("State")
.HasColumnType("integer");
b.Property("StoreId")
.HasColumnType("text");
b.Property("TransactionId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("StoreId");
b.HasIndex("TransactionId");
b.ToTable("PendingTransactions");
});
modelBuilder.Entity("BTCPayServer.Data.PlannedTransaction", b =>
{
b.Property("Id")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Blob")
.HasColumnType("bytea");
b.Property("BroadcastAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("PlannedTransactions");
});
modelBuilder.Entity("BTCPayServer.Data.PullPaymentData", b =>
{
b.Property("Id")
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("Archived")
.HasColumnType("boolean");
b.Property("Blob")
.HasColumnType("JSONB");
b.Property("Currency")
.HasColumnType("text");
b.Property("EndDate")
.HasColumnType("timestamp with time zone");
b.Property("Limit")
.HasColumnType("numeric");
b.Property("StartDate")
.HasColumnType("timestamp with time zone");
b.Property("StoreId")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
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("character varying(30)");
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("JSONB");
b.HasKey("Id");
b.ToTable("Settings");
});
modelBuilder.Entity("BTCPayServer.Data.StoreData", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property("Archived")
.HasColumnType("boolean");
b.Property("DefaultCrypto")
.HasColumnType("text");
b.Property("DerivationStrategies")
.HasColumnType("JSONB");
b.Property("DerivationStrategy")
.HasColumnType("text");
b.Property("SpeedPolicy")
.HasColumnType("integer");
b.Property("StoreBlob")
.HasColumnType("JSONB");
b.Property("StoreCertificate")
.HasColumnType("bytea");
b.Property("StoreName")
.HasColumnType("text");
b.Property("StoreWebsite")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Stores");
});
modelBuilder.Entity("BTCPayServer.Data.StoreRole", b =>
{
b.Property("Id")
.HasColumnType("text");
b.Property>("Permissions")
.HasColumnType("text[]");
b.Property("Role")
.HasColumnType("text");
b.Property("StoreDataId")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("StoreDataId", "Role")
.IsUnique();
b.ToTable("StoreRoles");
});
modelBuilder.Entity("BTCPayServer.Data.StoreSettingData", b =>
{
b.Property("StoreId")
.HasColumnType("text");
b.Property("Name")
.HasColumnType("text");
b.Property("Value")
.HasColumnType("JSONB");
b.HasKey("StoreId", "Name");
b.ToTable("StoreSettings");
});
modelBuilder.Entity("BTCPayServer.Data.StoreWebhookData", b =>
{
b.Property("StoreId")
.HasColumnType("text");
b.Property("WebhookId")
.HasColumnType("character varying(25)");
b.HasKey("StoreId", "WebhookId");
b.HasIndex("StoreId")
.IsUnique();
b.HasIndex("WebhookId")
.IsUnique();
b.ToTable("StoreWebhooks");
});
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("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ApplicationUserId");
b.ToTable("Files");
});
modelBuilder.Entity("BTCPayServer.Data.Subscriptions.EntitlementData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property("Id"));
b.Property("CustomId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("custom_id");
b.Property("Description")
.HasColumnType("text")
.HasColumnName("description");
b.Property("OfferingId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("offering_id");
b.HasKey("Id");
b.HasIndex("OfferingId", "CustomId")
.IsUnique();
b.ToTable("subs_entitlements");
});
modelBuilder.Entity("BTCPayServer.Data.Subscriptions.OfferingData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("id");
b.Property("AdditionalData")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("additional_data")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("AppId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("app_id");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamptz")
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property("DefaultPaymentRemindersDays")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(3)
.HasColumnName("payment_reminder_days");
b.Property("Metadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("SuccessRedirectUrl")
.HasColumnType("text")
.HasColumnName("success_redirect_url");
b.HasKey("Id");
b.HasIndex("AppId");
b.ToTable("subs_offerings");
});
modelBuilder.Entity("BTCPayServer.Data.Subscriptions.PlanChangeData", b =>
{
b.Property("PlanId")
.HasColumnType("text")
.HasColumnName("plan_id");
b.Property("PlanChangeId")
.HasColumnType("text")
.HasColumnName("plan_change_id");
b.Property("Type")
.IsRequired()
.HasColumnType("text")
.HasColumnName("type");
b.HasKey("PlanId", "PlanChangeId");
b.HasIndex("PlanChangeId");
b.ToTable("subs_plan_changes");
});
modelBuilder.Entity("BTCPayServer.Data.Subscriptions.PlanCheckoutData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("id");
b.Property("AdditionalData")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("additional_data")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("BaseUrl")
.IsRequired()
.HasColumnType("text")
.HasColumnName("base_url");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamptz")
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property("Credited")
.HasColumnType("numeric")
.HasColumnName("credited");
b.Property("Expiration")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasColumnName("expiration")
.HasDefaultValueSql("now() + interval '1 day'");
b.Property("InvoiceId")
.HasColumnType("text")
.HasColumnName("invoice_id");
b.Property("InvoiceMetadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("invoice_metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("IsTrial")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("is_trial");
b.Property("Metadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("NewSubscriber")
.HasColumnType("boolean")
.HasColumnName("new_subscriber");
b.Property("NewSubscriberMetadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("new_subscriber_metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("OnPay")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasDefaultValue("SoftMigration")
.HasColumnName("on_pay");
b.Property("PlanId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("plan_id");
b.Property("PlanStarted")
.HasColumnType("boolean")
.HasColumnName("plan_started");
b.Property("RefundAmount")
.HasColumnType("numeric")
.HasColumnName("refund_amount");
b.Property("SubscriberId")
.HasColumnType("bigint")
.HasColumnName("subscriber_id");
b.Property("SuccessRedirectUrl")
.HasColumnType("text")
.HasColumnName("success_redirect_url");
b.Property("TestAccount")
.HasColumnType("boolean")
.HasColumnName("test_account");
b.HasKey("Id");
b.HasIndex("Expiration");
b.HasIndex("InvoiceId");
b.HasIndex("PlanId");
b.HasIndex("SubscriberId");
b.ToTable("subs_plan_checkouts");
});
modelBuilder.Entity("BTCPayServer.Data.Subscriptions.PlanData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("id");
b.Property("AdditionalData")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("additional_data")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamptz")
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property("Currency")
.IsRequired()
.HasColumnType("text")
.HasColumnName("currency");
b.Property("Description")
.HasColumnType("text")
.HasColumnName("description");
b.Property("GracePeriodDays")
.HasColumnType("integer")
.HasColumnName("grace_period_days");
b.Property("MemberCount")
.HasColumnType("integer")
.HasColumnName("members_count");
b.Property("Metadata")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("metadata")
.HasDefaultValueSql("'{}'::jsonb");
b.Property("MonthlyRevenue")
.HasColumnType("numeric")
.HasColumnName("monthly_revenue");
b.Property("Name")
.IsRequired()
.HasColumnType("text")
.HasColumnName("name");
b.Property("OfferingId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("offering_id");
b.Property("OptimisticActivation")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(true)
.HasColumnName("optimistic_activation");
b.Property("Price")
.HasColumnType("numeric")
.HasColumnName("price");
b.Property("RecurringType")
.IsRequired()
.HasColumnType("text")
.HasColumnName("recurring_type");
b.Property