# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-21 11:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Clan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(max_length=5, null=True)),
                ('title', models.CharField(max_length=255, null=True)),
                ('elo_6', models.IntegerField(null=True)),
                ('elo_8', models.IntegerField(null=True)),
                ('elo_10', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ClanArenaStat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arena_id', models.CharField(max_length=255)),
                ('wins_percent', models.FloatField()),
                ('battles_count', models.IntegerField()),
                ('clan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arena_stats', to='global_map.Clan')),
            ],
        ),
        migrations.CreateModel(
            name='Front',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('front_id', models.CharField(max_length=254)),
                ('max_vehicle_level', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('province_id', models.CharField(max_length=255)),
                ('province_name', models.CharField(max_length=255)),
                ('arena_id', models.CharField(max_length=255)),
                ('arena_name', models.CharField(max_length=255)),
                ('prime_time', models.TimeField()),
                ('server', models.CharField(max_length=10)),
                ('front', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='global_map.Front')),
                ('province_owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='global_map.Clan')),
            ],
        ),
        migrations.CreateModel(
            name='ProvinceAssault',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('prime_time', models.TimeField()),
                ('arena_id', models.CharField(max_length=255)),
                ('round_number', models.IntegerField()),
                ('landing_type', models.CharField(max_length=255, null=True)),
                ('clans', models.ManyToManyField(to='global_map.Clan')),
                ('current_owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='global_map.Clan')),
                ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assaults', to='global_map.Province')),
            ],
        ),
        migrations.CreateModel(
            name='ProvinceBattle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arena_id', models.CharField(max_length=255)),
                ('start_at', models.DateTimeField()),
                ('round', models.IntegerField()),
                ('assault', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='battles', to='global_map.ProvinceAssault')),
                ('clan_a', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='global_map.Clan')),
                ('clan_b', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='global_map.Clan')),
                ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='battles', to='global_map.Province')),
                ('winner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='battles_winner', to='global_map.Clan')),
            ],
            options={
                'ordering': ('round', 'start_at'),
            },
        ),
        migrations.CreateModel(
            name='ProvinceTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('tag', models.CharField(max_length=255)),
                ('province_id', models.CharField(max_length=255)),
            ],
        ),
    ]
