# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-02 22:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Advice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pair', models.CharField(max_length=30)),
                ('position', models.CharField(max_length=30)),
                ('diff', models.FloatField(default=0)),
                ('price', models.FloatField()),
                ('tweet', models.CharField(max_length=280)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('RUNNING', 'Running'), ('ENDED', 'Ended')], max_length=25)),
                ('ma1', models.PositiveSmallIntegerField()),
                ('ma2', models.PositiveSmallIntegerField()),
                ('data_range', models.CharField(default='3h', max_length=25)),
                ('data_group', models.CharField(default='1m', max_length=25)),
                ('data_interval', models.CharField(default='10', max_length=25)),
                ('btc_balance_at_start', models.FloatField(default=0)),
                ('euro_balance_at_start', models.FloatField(default=0)),
                ('btc_balance', models.FloatField(default=0)),
                ('euro_balance', models.FloatField(default=0)),
                ('started_at', models.DateTimeField(null=True)),
                ('ended_at', models.DateTimeField(null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Trade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_id', models.IntegerField(default=0)),
                ('amount', models.FloatField()),
                ('price', models.FloatField()),
                ('total', models.FloatField()),
                ('fee', models.FloatField()),
                ('type', models.CharField(choices=[('BUY', 'Buy'), ('SELL', 'Sell')], max_length=25)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('session', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, related_name='trades', to='trader.Session')),
            ],
        ),
    ]
