# Generated by Django 6.0.7 on 2026-07-23 12:44

import apps.shop.fields
import django.db.models.deletion
import pyaa.helpers.string
import tinymce.models
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("customer", "__first__"),
        ("language", "__first__"),
        ("sites", "0002_alter_domain_unique"),
    ]

    operations = [
        migrations.CreateModel(
            name="Plan",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "token",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        unique=True,
                        verbose_name="model.field.token",
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=255, verbose_name="model.field.name"),
                ),
                (
                    "tag",
                    models.SlugField(
                        blank=True,
                        default=None,
                        help_text="model.field.tag.help",
                        max_length=255,
                        null=True,
                        verbose_name="model.field.tag",
                    ),
                ),
                (
                    "plan_type",
                    models.CharField(
                        choices=[
                            ("credit-purchase", "enum.shop-plan-type.credit-purchase"),
                            ("subscription", "enum.shop-plan-type.subscription"),
                            ("voucher", "enum.shop-plan-type.voucher"),
                        ],
                        default=None,
                        max_length=255,
                        verbose_name="model.field.plan-type",
                    ),
                ),
                (
                    "gateway",
                    models.CharField(
                        choices=[("stripe", "enum.shop-payment-gateway.stripe")],
                        max_length=255,
                        verbose_name="model.field.payment-gateway",
                    ),
                ),
                (
                    "external_id",
                    models.CharField(
                        blank=True,
                        max_length=255,
                        null=True,
                        verbose_name="model.field.external-id",
                    ),
                ),
                (
                    "currency",
                    models.CharField(max_length=3, verbose_name="model.field.currency"),
                ),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=10,
                        verbose_name="model.field.price",
                    ),
                ),
                (
                    "credits",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="model.field.credits"
                    ),
                ),
                (
                    "frequency_type",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("day", "enum.shop-plan-frequency-type.day"),
                            ("week", "enum.shop-plan-frequency-type.week"),
                            ("month", "enum.shop-plan-frequency-type.month"),
                            ("year", "enum.shop-plan-frequency-type.year"),
                            ("quarter", "enum.shop-plan-frequency-type.quarter"),
                            (
                                "semi_annual",
                                "enum.shop-plan-frequency-type.semi_annual",
                            ),
                        ],
                        max_length=255,
                        null=True,
                        verbose_name="model.field.frequency-type",
                    ),
                ),
                (
                    "frequency_amount",
                    models.IntegerField(
                        blank=True,
                        default=0,
                        null=True,
                        verbose_name="model.field.frequency-amount",
                    ),
                ),
                (
                    "featured",
                    models.BooleanField(
                        default=False, verbose_name="model.field.featured"
                    ),
                ),
                (
                    "bonus",
                    models.IntegerField(
                        blank=True,
                        help_text="model.hint.plan-bonus",
                        null=True,
                        verbose_name="model.field.bonus",
                    ),
                ),
                (
                    "image",
                    apps.shop.fields.PlanImageField(
                        blank=True,
                        crop=["middle", "center"],
                        force_format=None,
                        keep_meta=True,
                        null=True,
                        quality=100,
                        scale=None,
                        size=[1024, 576],
                        upload_to="images/plan/%Y/%m/%d",
                        verbose_name="model.field.image",
                    ),
                ),
                (
                    "sort_order",
                    models.IntegerField(
                        default=0, verbose_name="model.field.sort-order"
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        default=True, verbose_name="model.field.active"
                    ),
                ),
                (
                    "description",
                    tinymce.models.HTMLField(
                        blank=True, null=True, verbose_name="model.field.description"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "language",
                    models.ForeignKey(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.RESTRICT,
                        to="language.language",
                        verbose_name="model.field.language",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="plans",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-plan.name",
                "verbose_name_plural": "model.shop-plan.name.plural",
                "db_table": "shop_plan",
            },
        ),
        migrations.CreateModel(
            name="CreditPurchase",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "token",
                    models.CharField(
                        default=pyaa.helpers.string.StringHelper.generate_credit_purchase_token,
                        editable=False,
                        max_length=255,
                        unique=True,
                        verbose_name="model.field.token",
                    ),
                ),
                (
                    "currency",
                    models.CharField(max_length=3, verbose_name="model.field.currency"),
                ),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=10,
                        verbose_name="model.field.price",
                    ),
                ),
                (
                    "invoice_generated",
                    models.BooleanField(
                        default=False, verbose_name="model.field.invoice-generated"
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("initial", "enum.shop-credit-purchase-status.initial"),
                            ("analysis", "enum.shop-credit-purchase-status.analysis"),
                            ("approved", "enum.shop-credit-purchase-status.approved"),
                            ("canceled", "enum.shop-credit-purchase-status.canceled"),
                            ("failed", "enum.shop-credit-purchase-status.failed"),
                            (
                                "charged-back",
                                "enum.shop-credit-purchase-status.charged-back",
                            ),
                            ("rejected", "enum.shop-credit-purchase-status.rejected"),
                            ("refunded", "enum.shop-credit-purchase-status.refunded"),
                        ],
                        default="initial",
                        max_length=255,
                        verbose_name="model.field.status",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                        verbose_name="model.field.customer",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="credit_purchases",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
                (
                    "plan",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="shop.plan",
                        verbose_name="model.field.plan",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.credit-puchase.name",
                "verbose_name_plural": "model.credit-purchase.name.plural",
                "db_table": "credit_purchase",
            },
        ),
        migrations.CreateModel(
            name="Product",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "token",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        unique=True,
                        verbose_name="model.field.token",
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=255, verbose_name="model.field.name"),
                ),
                (
                    "slug",
                    models.SlugField(
                        blank=True,
                        max_length=255,
                        null=True,
                        unique=True,
                        verbose_name="model.field.slug",
                    ),
                ),
                (
                    "description",
                    tinymce.models.HTMLField(
                        blank=True, null=True, verbose_name="model.field.description"
                    ),
                ),
                (
                    "image",
                    apps.shop.fields.ProductImageField(
                        blank=True,
                        crop=["middle", "center"],
                        force_format=None,
                        keep_meta=True,
                        null=True,
                        quality=100,
                        scale=None,
                        size=[1024, 576],
                        upload_to="images/product/%Y/%m/%d",
                        verbose_name="model.field.image",
                    ),
                ),
                (
                    "currency",
                    models.CharField(max_length=3, verbose_name="model.field.currency"),
                ),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=10,
                        verbose_name="model.field.price",
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        default=True, verbose_name="model.field.active"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="products",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-product.name",
                "verbose_name_plural": "model.shop-product.name.plural",
                "db_table": "shop_product",
            },
        ),
        migrations.CreateModel(
            name="ProductFile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=255, verbose_name="model.field.name"),
                ),
                (
                    "description",
                    models.TextField(
                        blank=True, null=True, verbose_name="model.field.description"
                    ),
                ),
                (
                    "file",
                    apps.shop.fields.ProductFileField(
                        max_length=255,
                        upload_to="files/product/%Y/%m/%d",
                        verbose_name="model.field.file",
                    ),
                ),
                (
                    "file_type",
                    models.CharField(
                        blank=True,
                        max_length=50,
                        null=True,
                        verbose_name="model.field.file-type",
                    ),
                ),
                (
                    "file_size",
                    models.PositiveIntegerField(
                        blank=True,
                        default=0,
                        null=True,
                        verbose_name="model.field.file-size",
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        default=True, verbose_name="model.field.active"
                    ),
                ),
                (
                    "sort_order",
                    models.IntegerField(
                        default=0, verbose_name="model.field.sort-order"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "product",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="files",
                        to="shop.product",
                        verbose_name="model.field.product",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-product-file.name",
                "verbose_name_plural": "model.shop-product-file.name.plural",
                "db_table": "shop_product_file",
            },
        ),
        migrations.CreateModel(
            name="ProductPurchase",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "token",
                    models.CharField(
                        default=pyaa.helpers.string.StringHelper.generate_product_purchase_token,
                        editable=False,
                        max_length=255,
                        unique=True,
                        verbose_name="model.field.token",
                    ),
                ),
                (
                    "currency",
                    models.CharField(max_length=3, verbose_name="model.field.currency"),
                ),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=10,
                        verbose_name="model.field.price",
                    ),
                ),
                (
                    "invoice_generated",
                    models.BooleanField(
                        default=False, verbose_name="model.field.invoice-generated"
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("initial", "enum.shop-product-purchase-status.initial"),
                            ("analysis", "enum.shop-product-purchase-status.analysis"),
                            ("approved", "enum.shop-product-purchase-status.approved"),
                            ("canceled", "enum.shop-product-purchase-status.canceled"),
                            ("failed", "enum.shop-product-purchase-status.failed"),
                            (
                                "charged-back",
                                "enum.shop-product-purchase-status.charged-back",
                            ),
                            ("rejected", "enum.shop-product-purchase-status.rejected"),
                            ("refunded", "enum.shop-product-purchase-status.refunded"),
                        ],
                        default="initial",
                        max_length=255,
                        verbose_name="model.field.status",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                        verbose_name="model.field.customer",
                    ),
                ),
                (
                    "product",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="shop.product",
                        verbose_name="model.field.product",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="product_purchases",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.product-purchase.name",
                "verbose_name_plural": "model.product-purchase.name.plural",
                "db_table": "product_purchase",
            },
        ),
        migrations.CreateModel(
            name="Subscription",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "token",
                    models.CharField(
                        default=pyaa.helpers.string.StringHelper.generate_subscription_token,
                        editable=False,
                        max_length=255,
                        unique=True,
                        verbose_name="model.field.token",
                    ),
                ),
                (
                    "external_id",
                    models.CharField(
                        blank=True,
                        max_length=255,
                        null=True,
                        verbose_name="model.field.external-id",
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("initial", "enum.shop-subscription-status.initial"),
                            ("analysis", "enum.shop-subscription-status.analysis"),
                            ("active", "enum.shop-subscription-status.active"),
                            ("suspended", "enum.shop-subscription-status.suspended"),
                            ("canceled", "enum.shop-subscription-status.canceled"),
                            ("failed", "enum.shop-subscription-status.failed"),
                            (
                                "charged-back",
                                "enum.shop-subscription-status.charged-back",
                            ),
                            ("rejected", "enum.shop-subscription-status.rejected"),
                            ("refunded", "enum.shop-subscription-status.refunded"),
                        ],
                        default="initial",
                        max_length=255,
                        verbose_name="model.field.status",
                    ),
                ),
                (
                    "expire_at",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="model.field.expire-at"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="model.field.updated-at"
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                    ),
                ),
                (
                    "plan",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="shop.plan"
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscriptions",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-subscription.name",
                "verbose_name_plural": "model.shop-subscription.name.plural",
                "db_table": "shop_subscription",
            },
        ),
        migrations.CreateModel(
            name="CreditLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "object_type",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("general", "enum.shop-object-type.general"),
                            ("unknown", "enum.shop-object-type.unknown"),
                            ("bonus", "enum.shop-object-type.bonus"),
                            (
                                "credit-purchase",
                                "enum.shop-object-type.credit-purchase",
                            ),
                            (
                                "product-purchase",
                                "enum.shop-object-type.product-purchase",
                            ),
                            ("subscription", "enum.shop-object-type.subscription"),
                            ("voucher", "enum.shop-object-type.voucher"),
                        ],
                        default="unknown",
                        max_length=255,
                        null=True,
                        verbose_name="model.field.object-type",
                    ),
                ),
                (
                    "object_id",
                    models.BigIntegerField(
                        blank=True,
                        default=0,
                        null=True,
                        verbose_name="model.field.object-id",
                    ),
                ),
                (
                    "amount",
                    models.IntegerField(default=0, verbose_name="model.field.amount"),
                ),
                (
                    "is_refund",
                    models.BooleanField(
                        default=False, verbose_name="model.field.is-refund"
                    ),
                ),
                (
                    "description",
                    models.TextField(
                        blank=True, null=True, verbose_name="model.field.description"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                        verbose_name="model.field.customer",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="credit_logs",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-credit-log.name",
                "verbose_name_plural": "model.shop-credit-log.name.plural",
                "db_table": "shop_credit_log",
                "indexes": [
                    models.Index(
                        fields=["object_id", "object_type"],
                        name="shop_credit_log_object",
                    ),
                    models.Index(
                        fields=["object_type"], name="shop_credit_log_object_type"
                    ),
                    models.Index(
                        fields=["is_refund"], name="shop_credit_log_is_refund"
                    ),
                    models.Index(
                        fields=["created_at"], name="shop_credit_log_created_at"
                    ),
                ],
            },
        ),
        migrations.CreateModel(
            name="EventLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="model.field.id",
                    ),
                ),
                (
                    "object_type",
                    models.CharField(
                        choices=[
                            ("general", "enum.shop-object-type.general"),
                            ("unknown", "enum.shop-object-type.unknown"),
                            ("bonus", "enum.shop-object-type.bonus"),
                            (
                                "credit-purchase",
                                "enum.shop-object-type.credit-purchase",
                            ),
                            (
                                "product-purchase",
                                "enum.shop-object-type.product-purchase",
                            ),
                            ("subscription", "enum.shop-object-type.subscription"),
                            ("voucher", "enum.shop-object-type.voucher"),
                        ],
                        default="unknown",
                        max_length=255,
                        verbose_name="model.field.object-type",
                    ),
                ),
                (
                    "object_id",
                    models.BigIntegerField(
                        blank=True,
                        default=0,
                        null=True,
                        verbose_name="model.field.object-id",
                    ),
                ),
                (
                    "event_id",
                    models.CharField(
                        blank=True,
                        max_length=255,
                        null=True,
                        unique=True,
                        verbose_name="model.field.event-id",
                    ),
                ),
                (
                    "currency",
                    models.CharField(
                        blank=True,
                        max_length=3,
                        null=True,
                        verbose_name="model.field.currency",
                    ),
                ),
                (
                    "amount",
                    models.DecimalField(
                        decimal_places=2,
                        default=0,
                        max_digits=10,
                        verbose_name="model.field.amount",
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        blank=True,
                        max_length=255,
                        null=True,
                        verbose_name="model.field.status",
                    ),
                ),
                (
                    "description",
                    models.TextField(
                        blank=True, null=True, verbose_name="model.field.description"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="model.field.created-at"
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                        verbose_name="model.field.customer",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="event_logs",
                        to="sites.site",
                        verbose_name="model.field.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "model.shop-event-log.name",
                "verbose_name_plural": "model.shop-event-log.name.plural",
                "db_table": "shop_event_log",
                "indexes": [
                    models.Index(
                        fields=["object_id", "object_type"],
                        name="shop_event_log_object",
                    ),
                    models.Index(
                        fields=["object_type"], name="shop_event_log_object_type"
                    ),
                    models.Index(fields=["customer"], name="shop_event_log_customer"),
                    models.Index(fields=["status"], name="shop_event_log_status"),
                    models.Index(
                        fields=["created_at"], name="shop_event_log_created_at"
                    ),
                ],
            },
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["name"], name="shop_plan_name"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["tag"], name="shop_plan_tag"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["token"], name="shop_plan_token"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["gateway"], name="shop_plan_gateway"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["currency"], name="shop_plan_currency"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["plan_type"], name="shop_plan_plan_type"),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(
                fields=["frequency_type"], name="shop_plan_frequency_type"
            ),
        ),
        migrations.AddIndex(
            model_name="plan",
            index=models.Index(fields=["active"], name="shop_plan_active"),
        ),
        migrations.AddIndex(
            model_name="creditpurchase",
            index=models.Index(fields=["token"], name="shop_credit_purchase_token"),
        ),
        migrations.AddIndex(
            model_name="creditpurchase",
            index=models.Index(fields=["status"], name="shop_credit_purchase_status"),
        ),
        migrations.AddIndex(
            model_name="creditpurchase",
            index=models.Index(
                fields=["invoice_generated"], name="shop_credit_purchase_inv_gen"
            ),
        ),
        migrations.AddIndex(
            model_name="product",
            index=models.Index(fields=["name"], name="shop_product_name"),
        ),
        migrations.AddIndex(
            model_name="product",
            index=models.Index(fields=["token"], name="shop_product_token"),
        ),
        migrations.AddIndex(
            model_name="product",
            index=models.Index(fields=["currency"], name="shop_product_currency"),
        ),
        migrations.AddIndex(
            model_name="product",
            index=models.Index(fields=["active"], name="shop_product_active"),
        ),
        migrations.AddIndex(
            model_name="product",
            index=models.Index(fields=["slug"], name="shop_product_slug"),
        ),
        migrations.AddIndex(
            model_name="productfile",
            index=models.Index(fields=["product"], name="shop_product_file_product"),
        ),
        migrations.AddIndex(
            model_name="productfile",
            index=models.Index(
                fields=["file_type"], name="shop_product_file_file_type"
            ),
        ),
        migrations.AddIndex(
            model_name="productfile",
            index=models.Index(fields=["active"], name="shop_product_file_active"),
        ),
        migrations.AddIndex(
            model_name="productpurchase",
            index=models.Index(fields=["token"], name="shop_product_purchase_token"),
        ),
        migrations.AddIndex(
            model_name="productpurchase",
            index=models.Index(fields=["status"], name="shop_product_purchase_status"),
        ),
        migrations.AddIndex(
            model_name="productpurchase",
            index=models.Index(
                fields=["invoice_generated"], name="shop_product_purchase_inv_gen"
            ),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(fields=["token"], name="shop_subscription_token"),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(fields=["customer"], name="shop_subscription_customer"),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(fields=["plan"], name="shop_subscription_plan"),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(
                fields=["external_id"], name="shop_subscription_external_id"
            ),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(
                fields=["expire_at"], name="shop_subscription_expire_at"
            ),
        ),
        migrations.AddIndex(
            model_name="subscription",
            index=models.Index(fields=["status"], name="shop_subscription_status"),
        ),
    ]
