# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-11-03 15:23
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='Army',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
                ('count', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Army_Party',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
                ('army', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='armylist.Army')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Attack',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cc', models.IntegerField()),
                ('ct', models.IntegerField()),
                ('dmg', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cost', models.IntegerField()),
                ('min', models.IntegerField()),
                ('max', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Competence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
                ('description', models.TextField()),
                ('dim', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='TroupUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='armylist.Attack')),
            ],
        ),
        migrations.CreateModel(
            name='spell',
            fields=[
                ('card_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='armylist.Card')),
                ('name', models.TextField(unique=True)),
                ('description', models.TextField()),
                ('costSpell', models.IntegerField()),
                ('level', models.IntegerField()),
            ],
            bases=('armylist.card',),
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('card_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='armylist.Card')),
                ('name', models.TextField(unique=True)),
                ('action', models.IntegerField()),
                ('mouvement', models.IntegerField()),
                ('wound', models.IntegerField()),
                ('commandment', models.IntegerField()),
                ('notes', models.TextField()),
                ('defence', models.IntegerField()),
                ('armure', models.IntegerField()),
                ('force', models.IntegerField()),
                ('taille', models.IntegerField()),
                ('type', models.CharField(choices=[('Independant', 'Independant'), ('Unite', 'Unite'), ('Invocation', 'Invocation')], max_length=20)),
                ('attaques', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='units', to='armylist.Attack')),
                ('competences', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='units', to='armylist.Competence')),
            ],
            bases=('armylist.card',),
        ),
        migrations.AddField(
            model_name='army_party',
            name='unitList',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='armylist.TroupUnit'),
        ),
        migrations.AddField(
            model_name='army',
            name='unitList',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='armylist.Unit'),
        ),
    ]
