# Generated by Django 2.1.3 on 2018-12-11 21:18

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Bank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('crypto_bank', models.CharField(default='0.0', max_length=50)),
                ('cash_bank', models.CharField(default='0.0000', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='CryptoCandle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('crypto_traded', models.CharField(max_length=3)),
                ('currency_quoted', models.CharField(max_length=3)),
                ('period_interval', models.CharField(max_length=3)),
                ('period_start_timestamp', models.CharField(max_length=50)),
                ('period_low', models.DecimalField(decimal_places=10, max_digits=25)),
                ('period_open', models.DecimalField(decimal_places=10, max_digits=25)),
                ('period_close', models.DecimalField(decimal_places=10, max_digits=25)),
                ('period_high', models.DecimalField(decimal_places=10, max_digits=25)),
                ('period_volume', models.DecimalField(decimal_places=10, max_digits=25)),
                ('data_source', models.CharField(max_length=255)),
                ('update_timestamp', models.DateTimeField(default=datetime.datetime(2018, 12, 11, 21, 18, 14, 737994, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='CryptoProphet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('object_type', models.CharField(max_length=50)),
                ('crypto_traded', models.CharField(max_length=3)),
                ('currency_quoted', models.CharField(default='USD', max_length=3)),
                ('period_interval', models.CharField(default='1d', max_length=3)),
                ('metric_value', models.DecimalField(decimal_places=10, max_digits=25, null=True)),
                ('upper', models.DecimalField(decimal_places=10, max_digits=25, null=True)),
                ('lower', models.DecimalField(decimal_places=10, max_digits=25, null=True)),
                ('change', models.DecimalField(decimal_places=10, max_digits=25, null=True)),
                ('update_timestamp', models.DateTimeField(default=datetime.datetime(2018, 12, 11, 21, 18, 14, 740108, tzinfo=utc))),
                ('crypto_candle', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='crypto_track.CryptoCandle')),
            ],
        ),
        migrations.CreateModel(
            name='PyTrends',
            fields=[
                ('date', models.DateField(primary_key=True, serialize=False)),
                ('buy_bitcoin', models.IntegerField(null=True)),
                ('btc_usd', models.IntegerField(null=True)),
                ('is_partial', models.BooleanField(default=False)),
                ('trend_ratio', models.DecimalField(decimal_places=5, max_digits=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SignalSimulation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('signal', models.CharField(max_length=4, null=True)),
                ('candle_compare', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='cryptocandle_simulation_compare', to='crypto_track.CryptoCandle')),
                ('crypto_candle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cryptocandle_simulation', to='crypto_track.CryptoCandle')),
            ],
        ),
        migrations.CreateModel(
            name='Simulation',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=300)),
                ('url', models.CharField(max_length=300, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='signalsimulation',
            name='simulation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crypto_track.Simulation'),
        ),
        migrations.AddField(
            model_name='cryptoprophet',
            name='simulation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crypto_track.Simulation'),
        ),
        migrations.AddField(
            model_name='cryptocandle',
            name='search_trend',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='crypto_track.PyTrends'),
        ),
        migrations.AddField(
            model_name='bank',
            name='signal_simulation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='crypto_track.SignalSimulation'),
        ),
        migrations.AddField(
            model_name='bank',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
