# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-26 14:04
from __future__ import unicode_literals

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='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name=b'Card Name')),
                ('oracle_text', models.TextField(verbose_name=b'Card Oracle text')),
                ('image_link', models.TextField(verbose_name=b'Gatherer Image Link')),
            ],
        ),
        migrations.CreateModel(
            name='Decision',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(verbose_name=b'Justification')),
                ('score', models.CharField(max_length=3, verbose_name=b'Score X-Y')),
            ],
        ),
        migrations.CreateModel(
            name='Deck',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, verbose_name=b'Card Name')),
                ('cards', models.ManyToManyField(to='threecardmagic.Card')),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='League',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name=b'League Name')),
                ('rulestext', models.TextField(verbose_name=b'League Rules')),
                ('active', models.BooleanField(default=False, verbose_name=b'Current League')),
            ],
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('decks', models.ManyToManyField(to='threecardmagic.Deck')),
            ],
        ),
        migrations.CreateModel(
            name='Round',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=False, verbose_name=b'Current League')),
                ('league', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='threecardmagic.League')),
                ('winner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='match',
            name='round_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='threecardmagic.Round'),
        ),
        migrations.AddField(
            model_name='decision',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='threecardmagic.Match'),
        ),
        migrations.AddField(
            model_name='decision',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
