# Generated by Django 2.1.7 on 2019-02-22 16:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('apiKey', models.CharField(max_length=255)),
                ('secret', models.CharField(max_length=255)),
                ('password', models.CharField(max_length=255, null=True)),
                ('uid', models.CharField(max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Exchange',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_name', models.CharField(max_length=50, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('active', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Market',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_name', models.CharField(db_index=True, max_length=50)),
                ('symbol', models.CharField(max_length=50)),
                ('data', models.TextField()),
                ('exchange', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='markets', to='exchanges.Exchange')),
            ],
        ),
        migrations.CreateModel(
            name='MarketOHLCV',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('open', models.FloatField()),
                ('hight', models.FloatField()),
                ('low', models.FloatField()),
                ('close', models.FloatField()),
                ('volume', models.FloatField()),
                ('market', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ohlcv', to='exchanges.Market')),
            ],
        ),
        migrations.AddField(
            model_name='account',
            name='exchange',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='account', to='exchanges.Exchange'),
        ),
    ]
