# Generated by Django 2.1 on 2018-09-03 14:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='TermsPolicyRepo',
            fields=[
                ('term_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('term_type', models.CharField(max_length=50)),
                ('term_version', models.CharField(max_length=15)),
                ('term_html', models.TextField()),
                ('term_text', models.TextField()),
                ('term_status', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TokenOrders',
            fields=[
                ('token_order_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('token_order_external_id', models.CharField(max_length=64)),
                ('customer_external_id', models.CharField(max_length=64)),
                ('usd_value', models.DecimalField(decimal_places=2, max_digits=12)),
                ('token_value', models.DecimalField(decimal_places=18, max_digits=28)),
                ('payment_currency', models.CharField(max_length=10)),
                ('payment_currency_value', models.DecimalField(decimal_places=18, max_digits=28, null=True)),
                ('payment_address', models.CharField(max_length=255, null=True)),
                ('payment_destination_tag', models.CharField(max_length=25, null=True)),
                ('txn_id', models.CharField(max_length=255, null=True)),
                ('confirms_needed', models.IntegerField(null=True)),
                ('timeout', models.IntegerField(null=True)),
                ('status_url', models.CharField(max_length=255, null=True)),
                ('qrcode_url', models.CharField(max_length=255, null=True)),
                ('payment_status', models.IntegerField(null=True)),
                ('payment_status_text', models.CharField(max_length=255, null=True)),
                ('payment_received', models.BooleanField(default=False)),
                ('tokens_credited', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
            options={
                'ordering': ['-token_order_id'],
            },
        ),
        migrations.CreateModel(
            name='TokenTransactions',
            fields=[
                ('token_transaction_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('token_transaction_external_id', models.CharField(max_length=64)),
                ('customer_external_id', models.CharField(max_length=64)),
                ('transaction_type', models.CharField(max_length=25)),
                ('token_value', models.DecimalField(decimal_places=18, max_digits=28)),
                ('withdrawal_address', models.CharField(max_length=255, null=True)),
                ('txn_id', models.CharField(max_length=255, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
            options={
                'ordering': ['-token_transaction_id'],
            },
        ),
        migrations.CreateModel(
            name='UserEligibilityRegistry',
            fields=[
                ('user_eligibility_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('customer_external_id', models.CharField(max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserTermsRegistry',
            fields=[
                ('user_term_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('customer_external_id', models.CharField(max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('term', models.ForeignKey(db_column='term_id', on_delete=django.db.models.deletion.PROTECT, to='launchpad.TermsPolicyRepo')),
            ],
        ),
    ]
