# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-14 23:32
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Bet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.FloatField()),
                ('odd', models.FloatField()),
                ('reward', models.FloatField()),
                ('creation_time', models.DateTimeField(default=datetime.datetime.now)),
                ('open', models.BooleanField(default=True)),
                ('won', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('creation_time', models.DateTimeField(default=datetime.datetime.now)),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField(blank=True)),
                ('home_name', models.CharField(max_length=50)),
                ('away_name', models.CharField(max_length=50)),
                ('home_odd', models.FloatField(default=1.0)),
                ('away_odd', models.FloatField(default=1.0)),
                ('draw_odd', models.FloatField(default=1.0)),
                ('closed', models.BooleanField(default=False)),
                ('result', models.IntegerField(blank=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Wallet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.FloatField()),
                ('active', models.BooleanField(default=True)),
                ('creation_time', models.DateTimeField(default=datetime.datetime.now)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='bet',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event'),
        ),
        migrations.AddField(
            model_name='bet',
            name='wallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Wallet'),
        ),
    ]
