# Generated by Django 5.2.3 on 2025-06-13 13:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('status', models.CharField(choices=[('created', 'Created'), ('succeeded', 'Succeeded'), ('failed', 'Failed')], max_length=10)),
                ('pgw_shop_id', models.CharField(blank=True, max_length=8)),
                ('pgw_order_id', models.CharField(max_length=50)),
                ('pgw_amount', models.CharField(max_length=12)),
                ('pgw_authorization_type', models.CharField(blank=True, max_length=1)),
                ('pgw_language', models.CharField(blank=True, max_length=2)),
                ('pgw_success_url', models.CharField(max_length=1000)),
                ('pgw_failure_url', models.CharField(max_length=1000)),
                ('pgw_first_name', models.CharField(blank=True, max_length=20)),
                ('pgw_last_name', models.CharField(blank=True, max_length=20)),
                ('pgw_street', models.CharField(blank=True, max_length=40)),
                ('pgw_city', models.CharField(blank=True, max_length=20)),
                ('pgw_post_code', models.CharField(blank=True, max_length=9)),
                ('pgw_country', models.CharField(blank=True, max_length=50)),
                ('pgw_telephone', models.CharField(blank=True, max_length=50)),
                ('pgw_email', models.CharField(blank=True, max_length=50)),
                ('pgw_disable_installments', models.CharField(blank=True, max_length=1)),
                ('pgw_signature', models.CharField(blank=True, max_length=128)),
                ('pgw_result_code', models.CharField(blank=True, max_length=4)),
                ('pgw_trace_ref', models.CharField(blank=True, max_length=200)),
                ('pgw_transaction_id', models.CharField(blank=True, max_length=10)),
                ('pgw_installments', models.CharField(blank=True, max_length=10)),
                ('pgw_card_type_id', models.CharField(blank=True, choices=[('1', 'American Express'), ('2', 'MasterCard'), ('3', 'Visa'), ('4', 'Diners'), ('5', 'Maestro')], default=None, max_length=2, null=True)),
                ('response_received_on', models.DateTimeField(blank=True, null=True)),
                ('response_signature_valid', models.BooleanField(default=False)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'htpayway_transactions',
            },
        ),
    ]
