<reponame>pinkdroids/django-wspay
# Generated by Django 4.0.1 on 2022-01-20 15:12

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


class Migration(migrations.Migration):

    dependencies = [
        ('wspay', '0002_wspaytransaction_wspayrequest_transactions'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='WSPayTransaction',
            new_name='TransactionHistory',
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(
                    auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('request_uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('stan', models.CharField(max_length=10)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=9)),
                ('approval_code', models.CharField(max_length=10)),
                ('ws_pay_order_id', models.CharField(max_length=50)),
                ('transaction_datetime', models.DateTimeField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('authorized', models.BooleanField(default=False)),
                ('completed', models.BooleanField(default=False)),
                ('voided', models.BooleanField(default=False)),
                ('refunded', models.BooleanField(default=False)),
                ('can_complete', models.BooleanField(default=False)),
                ('can_void', models.BooleanField(default=False)),
                ('can_refund', models.BooleanField(default=False)),
                ('expiration_date', models.DateField()),
                ('history', models.ManyToManyField(to='wspay.TransactionHistory')),
            ],
        ),
        migrations.AddField(
            model_name='wspayrequest',
            name='transaction',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='wspay.transaction'
            ),
        ),
    ]

# Generated by Django 4.0.1 on 2022-01-20 15:12

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


class Migration(migrations.Migration):

    dependencies = [
        ('wspay', '0002_wspaytransaction_wspayrequest_transactions'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='WSPayTransaction',
            new_name='TransactionHistory',
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(
                    auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('request_uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('stan', models.CharField(max_length=10)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=9)),
                ('approval_code', models.CharField(max_length=10)),
                ('ws_pay_order_id', models.CharField(max_length=50)),
                ('transaction_datetime', models.DateTimeField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('authorized', models.BooleanField(default=False)),
                ('completed', models.BooleanField(default=False)),
                ('voided', models.BooleanField(default=False)),
                ('refunded', models.BooleanField(default=False)),
                ('can_complete', models.BooleanField(default=False)),
                ('can_void', models.BooleanField(default=False)),
                ('can_refund', models.BooleanField(default=False)),
                ('expiration_date', models.DateField()),
                ('history', models.ManyToManyField(to='wspay.TransactionHistory')),
            ],
        ),
        migrations.AddField(
            model_name='wspayrequest',
            name='transaction',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='wspay.transaction'
            ),
        ),
    ]
# Generated by Django 4.0.1 on 2022-01-20 15:12