# Generated by Django 4.2 on 2023-04-25 00:50

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import djstripe.enums
import djstripe.fields


class Migration(migrations.Migration):
    dependencies = [
        ("djstripe", "0011_2_7"),
    ]

    operations = [
        migrations.CreateModel(
            name="InvoiceOrLineItem",
            fields=[
                (
                    "id",
                    models.CharField(max_length=255, primary_key=True, serialize=False),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.InvoiceorLineItemType, max_length=12
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="VerificationReport",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text=(
                            "Null here indicates that the livemode status is unknown or"
                            " was previously unrecorded. Otherwise, this field"
                            " indicates whether this record comes from Stripe test mode"
                            " or live mode operation."
                        ),
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("document", djstripe.fields.JSONField(blank=True, null=True)),
                ("id_number", djstripe.fields.JSONField(blank=True, null=True)),
                ("options", djstripe.fields.JSONField(blank=True, null=True)),
                ("selfie", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationType, max_length=9
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="customer",
            name="discount",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="invoice",
            name="discounts",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="invoiceitem",
            name="discounts",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="affirm",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="blik",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="customer_balance",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="klarna",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="konbini",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="link",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="paynow",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="pix",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="promptpay",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="paymentmethod",
            name="us_bank_account",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="payout",
            name="original_payout",
            field=models.OneToOneField(
                blank=True,
                help_text=(
                    "If this payout reverses another, this is the ID of the original"
                    " payout."
                ),
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="djstripe.payout",
            ),
        ),
        migrations.AddField(
            model_name="payout",
            name="reversed_by",
            field=models.OneToOneField(
                blank=True,
                help_text=(
                    "If this payout was reversed, this is the ID of the payout that"
                    " reverses this payout."
                ),
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="reversed_payout",
                to="djstripe.payout",
            ),
        ),
        migrations.AddField(
            model_name="product",
            name="default_price",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="The default price this product is associated with.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="products",
                to="djstripe.price",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="amount_subtotal",
            field=djstripe.fields.StripeQuantumCurrencyAmountField(
                blank=True, null=True
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="amount_total",
            field=djstripe.fields.StripeQuantumCurrencyAmountField(
                blank=True, null=True
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="currency",
            field=djstripe.fields.StripeCurrencyCodeField(
                blank=True, max_length=3, null=True
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="line_items",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="payment_status",
            field=djstripe.fields.StripeEnumField(
                blank=True,
                enum=djstripe.enums.SessionPaymentStatus,
                max_length=19,
                null=True,
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="setup_intent",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text=(
                    "The ID of the SetupIntent for Checkout Sessions in setup mode."
                ),
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="djstripe.setupintent",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="shipping_address_collection",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="shipping_cost",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="shipping_details",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="shipping_options",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="status",
            field=djstripe.fields.StripeEnumField(
                blank=True, enum=djstripe.enums.SessionStatus, max_length=8, null=True
            ),
        ),
        migrations.AddField(
            model_name="session",
            name="total_details",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="session",
            name="url",
            field=models.TextField(
                blank=True,
                help_text=(
                    "The URL to the Checkout Session. Redirect customers to this URL to"
                    " take them to Checkout. If you’re using Custom Domains, the URL"
                    " will use your subdomain. Otherwise, it’ll use"
                    " checkout.stripe.com. This value is only present when the session"
                    " is active."
                ),
                max_length=5000,
                null=True,
            ),
        ),
        migrations.AddField(
            model_name="upcominginvoice",
            name="discounts",
            field=djstripe.fields.JSONField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="webhookendpoint",
            name="tolerance",
            field=models.PositiveSmallIntegerField(
                default=300,
                help_text="Controls the milliseconds tolerance which wards against replay attacks. Leave this to its default value unless you know what you're doing.",
            ),
        ),
        migrations.AlterField(
            model_name="account",
            name="business_type",
            field=djstripe.fields.StripeEnumField(
                blank=True, default="", enum=djstripe.enums.BusinessType, max_length=17
            ),
        ),
        migrations.CreateModel(
            name="VerificationSession",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text=(
                            "Null here indicates that the livemode status is unknown or"
                            " was previously unrecorded. Otherwise, this field"
                            " indicates whether this record comes from Stripe test mode"
                            " or live mode operation."
                        ),
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("last_error", djstripe.fields.JSONField(blank=True, null=True)),
                ("redaction", djstripe.fields.JSONField(blank=True, null=True)),
                ("verified_outputs", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationSessionStatus, max_length=14
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationType, max_length=9
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "last_verification_report",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.verificationreport",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="SourceTransaction",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text=(
                            "Null here indicates that the livemode status is unknown or"
                            " was previously unrecorded. Otherwise, this field"
                            " indicates whether this record comes from Stripe test mode"
                            " or live mode operation."
                        ),
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("ach_credit_transfer", djstripe.fields.JSONField()),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=11, null=True
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("customer_data", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceTransactionStatus, max_length=10
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "source",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.source",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="LineItem",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text=(
                            "Null here indicates that the livemode status is unknown or"
                            " was previously unrecorded. Otherwise, this field"
                            " indicates whether this record comes from Stripe test mode"
                            " or live mode operation."
                        ),
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "amount_excluding_tax",
                    djstripe.fields.StripeQuantumCurrencyAmountField(),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("discount_amounts", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "discountable",
                    models.BooleanField(
                        default=False,
                        help_text=(
                            "If True, discounts will apply to this line item. Always"
                            " False for prorations."
                        ),
                    ),
                ),
                ("discounts", djstripe.fields.JSONField(blank=True, null=True)),
                ("period", djstripe.fields.JSONField()),
                ("period_end", djstripe.fields.StripeDateTimeField()),
                ("period_start", djstripe.fields.StripeDateTimeField()),
                ("price", djstripe.fields.JSONField()),
                (
                    "proration",
                    models.BooleanField(
                        default=False,
                        help_text=(
                            "Whether or not the invoice item was created automatically"
                            " as a proration adjustment when the customer switched"
                            " plans."
                        ),
                    ),
                ),
                ("proration_details", djstripe.fields.JSONField()),
                ("tax_amounts", djstripe.fields.JSONField(blank=True, null=True)),
                ("tax_rates", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.LineItem, max_length=12
                    ),
                ),
                (
                    "unit_amount_excluding_tax",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=11, null=True
                    ),
                ),
                (
                    "quantity",
                    models.IntegerField(
                        blank=True,
                        help_text=(
                            "The quantity of the subscription, if the line item is a"
                            " subscription or a proration."
                        ),
                        null=True,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice_item",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The ID of the invoice item associated with this line item"
                            " if any."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.invoiceitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The subscription that the invoice item pertains to, if"
                            " any."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription_item",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The subscription item that generated this invoice item."
                            " Left empty if the line item is not an explicit result of"
                            " a subscription."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.subscriptionitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Discount",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text=(
                            "Null here indicates that the livemode status is unknown or"
                            " was previously unrecorded. Otherwise, this field"
                            " indicates whether this record comes from Stripe test mode"
                            " or live mode operation."
                        ),
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("coupon", djstripe.fields.JSONField(blank=True, null=True)),
                ("end", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "promotion_code",
                    models.CharField(
                        blank=True,
                        help_text="The promotion code applied to create this discount.",
                        max_length=255,
                    ),
                ),
                ("start", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "checkout_session",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The Checkout session that this coupon is applied to, if it"
                            " is applied to a particular session in payment mode. Will"
                            " not be present for subscription mode."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.session",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The ID of the customer associated with this discount."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="customer_discounts",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The invoice that the discount’s coupon was applied to, if"
                            " it was applied directly to a particular invoice."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="invoice_discounts",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice_item",
                    djstripe.fields.InvoiceOrLineItemForeignKey(
                        blank=True,
                        help_text=(
                            "The invoice item id (or invoice line item id for invoice"
                            " line items of type=‘subscription’) that the discount’s"
                            " coupon was applied to, if it was applied directly to a"
                            " particular invoice item or invoice line item."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.invoiceorlineitem",
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text=(
                            "The subscription that this coupon is applied to, if it is"
                            " applied to a particular subscription."
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscription_discounts",
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
    ]
