# Generated by Django 6.0.3 on 2026-03-30 09:14

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


class Migration(migrations.Migration):

    dependencies = [
        ("codenerix_payments", "0017_alter_paymentrequest_locator"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="currency",
            options={
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "list",
                    "detail",
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="paymentanswer",
            options={
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "list",
                    "detail",
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="paymentconfirmation",
            options={
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "list",
                    "detail",
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="paymentrequest",
            options={
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "list",
                    "detail",
                ),
            },
        ),
        migrations.CreateModel(
            name="PaymentReturn",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    models.DateTimeField(
                        auto_now_add=True,
                        verbose_name="Created",
                    ),
                ),
                (
                    "updated",
                    models.DateTimeField(
                        auto_now=True,
                        verbose_name="Updated",
                    ),
                ),
                (
                    "ref",
                    models.CharField(
                        default=None,
                        max_length=50,
                        null=True,
                        verbose_name="Reference",
                    ),
                ),
                (
                    "error",
                    models.BooleanField(default=False, verbose_name="Error"),
                ),
                (
                    "error_txt",
                    models.TextField(
                        blank=True,
                        null=True,
                        verbose_name="Error Text",
                    ),
                ),
                (
                    "request",
                    models.TextField(
                        blank=True,
                        null=True,
                        verbose_name="Request",
                    ),
                ),
                (
                    "answer",
                    models.TextField(
                        blank=True,
                        null=True,
                        verbose_name="Answer",
                    ),
                ),
                (
                    "request_date",
                    models.DateTimeField(
                        blank=True,
                        editable=False,
                        null=True,
                        verbose_name="Request date",
                    ),
                ),
                (
                    "answer_date",
                    models.DateTimeField(
                        blank=True,
                        editable=False,
                        null=True,
                        verbose_name="Answer date",
                    ),
                ),
                (
                    "ip",
                    models.GenericIPAddressField(
                        editable=False,
                        verbose_name="IP",
                    ),
                ),
                (
                    "payment",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="paymentreturns",
                        to="codenerix_payments.paymentrequest",
                    ),
                ),
            ],
            options={
                "abstract": False,
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "list",
                    "detail",
                ),
            },
        ),
    ]
