# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-05-13 15:11
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CryptoCurrencyPayment',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name=b'ID')),
                ('crypto', models.CharField(max_length=50)),
                ('crypto_code', models.CharField(max_length=15, null=True)),
                ('address', models.CharField(max_length=200)),
                ('address_reused', models.BooleanField(default=False)),
                ('tx_hash', models.CharField(help_text=b'Transaction ID', max_length=150, null=True)),
                ('status', models.CharField(choices=[(b'new', b'New'), (b'paid', b'Paid'), (b'cancelled', b'Cancelled'), (b'processing', b'Processing')], default=b'new', max_length=50)),
                ('crypto_amount', models.DecimalField(decimal_places=12, help_text=b'Calculated crypto amount for fiat', max_digits=17)),
                ('paid_crypto_amount', models.DecimalField(decimal_places=12, default=0, help_text=b'Paid crypto amount', max_digits=17, null=True)),
                ('fiat_amount', models.DecimalField(decimal_places=2, help_text=b'Fiat amount', max_digits=9)),
                ('fiat_currency', models.CharField(default=b'USD', max_length=5)),
                ('payment_title', models.CharField(max_length=100, null=True)),
                ('payment_description', models.CharField(max_length=250, null=True)),
                ('object_id', models.CharField(max_length=100, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('child_payment', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parent', to='cryptocurrency_payment.CryptoCurrencyPayment')),
                ('content_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('parent_payment', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='child', to='cryptocurrency_payment.CryptoCurrencyPayment')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='crypto_payments', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
