# Generated by Django 3.1.7 on 2021-03-21 23:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Configuration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ethereum_events_from_block', models.IntegerField(default=0)),
            ],
            options={
                'verbose_name': 'Configuration',
                'verbose_name_plural': 'Configurations',
            },
        ),
        migrations.CreateModel(
            name='EthereumToWitnetSwap',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                ('initial_amount', models.IntegerField()),
                ('swapped_amount', models.IntegerField()),
                ('send_converted_funds_to', models.CharField(max_length=42)),
                ('burn_ethereum_transaction_hash', models.CharField(blank=True, max_length=66, null=True, unique=True)),
                ('swap_completed', models.BooleanField(default=False)),
                ('swap_witnet_transaction_hash', models.CharField(blank=True, max_length=64, null=True, unique=True)),
            ],
            options={
                'verbose_name': 'Ethereum To Witnet Swap',
                'verbose_name_plural': 'Ethereum To Witnet Swaps',
            },
        ),
        migrations.CreateModel(
            name='WitnetAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                ('address', models.CharField(max_length=42, unique=True)),
            ],
            options={
                'verbose_name': 'Witnet Address',
                'verbose_name_plural': 'Witnet Addresses',
            },
        ),
        migrations.CreateModel(
            name='WitnetToEthereumSwap',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                ('send_swapped_funds_to', models.CharField(max_length=42)),
                ('total_funds_received', models.IntegerField(default=0)),
                ('total_swapped', models.IntegerField(default=0)),
                ('status', models.CharField(choices=[('Waiting For Funds', 'Waiting For Funds'), ('Waiting For User Confirm', 'Waiting For User Confirm'), ('Waiting To Be Processed', 'Waiting To Be Processed'), ('Finished', 'Finished'), ('Bounced', 'Bounced')], default='Waiting For Funds', max_length=50)),
                ('swap_ethereum_transaction_hash', models.CharField(blank=True, max_length=66, null=True, unique=True)),
                ('uuid', models.UUIDField(default=uuid.UUID('8698617e-d647-44cc-9274-65a35d498b21'))),
                ('receive_user_funds_at', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='swap', to='witswap.witnetaddress')),
            ],
            options={
                'verbose_name': 'Witnet To Ethereum Swap',
                'verbose_name_plural': 'Witnet To Ethereum Swaps',
            },
        ),
    ]
