# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-03 18:37
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='Comisao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpf', models.CharField(max_length=20)),
                ('nome', models.CharField(max_length=150)),
                ('funcao', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Estadio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=150)),
                ('lotacao', models.IntegerField()),
                ('endereco', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Jogador',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpf', models.CharField(max_length=20)),
                ('nome', models.CharField(max_length=150)),
                ('posicao', models.IntegerField()),
                ('numCamisa', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Jogo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Partida',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('placarMandante', models.IntegerField()),
                ('placarVisitante', models.IntegerField()),
                ('data', models.DateTimeField()),
                ('estadio', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='myapp.Estadio')),
                ('jogo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='myapp.Jogo')),
            ],
        ),
        migrations.CreateModel(
            name='Time',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=150)),
            ],
        ),
        migrations.AddField(
            model_name='jogo',
            name='timeMandate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='time_mandante', to='myapp.Time'),
        ),
        migrations.AddField(
            model_name='jogo',
            name='timeVisitante',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='time_visitante', to='myapp.Time'),
        ),
        migrations.AddField(
            model_name='jogador',
            name='time',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='myapp.Time'),
        ),
        migrations.AddField(
            model_name='comisao',
            name='time',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='myapp.Time'),
        ),
    ]
