# Generated by Django 4.2.24 on 2025-09-06 10:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("pretixbase", "0286_alter_event_currency_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="PaymentWebhookEvent",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False
                    ),
                ),
                (
                    "cf_payment_id",
                    models.CharField(db_index=True, max_length=50, unique=True),
                ),
                ("order_code", models.CharField(max_length=50)),
                ("payment_local_id", models.CharField(max_length=50)),
                ("payment_status", models.CharField(max_length=50)),
                ("payload", models.TextField()),
                ("created_at", models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name="PaymentAttempt",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False
                    ),
                ),
                (
                    "order_id",
                    models.CharField(db_index=True, max_length=190, unique=True),
                ),
                (
                    "payment",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="pretixbase.orderpayment",
                    ),
                ),
            ],
        ),
    ]
