# Generated by Django 2.1.8 on 2019-05-19 11:43

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('escola', '0026_auto_20190428_0953'),
    ]

    operations = [
        migrations.CreateModel(
            name='AreaConhecimento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=40)),
                ('turma', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Area', to='escola.Turma')),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=70)),
                ('data', models.DateTimeField()),
                ('descricao', models.TextField()),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='EventoTurma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.Evento')),
                ('turma', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.Turma')),
            ],
        ),
        migrations.CreateModel(
            name='ProvaAreaMarcada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='ProvaMarcada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('conteudos', models.ManyToManyField(to='escola.Conteudo')),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.EventoTurma')),
            ],
        ),
        migrations.CreateModel(
            name='ProvaMateriaMarcada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_prova', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.ProvaMarcada')),
                ('materia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.MateriaDaTurma')),
            ],
        ),
        migrations.AddField(
            model_name='provaareamarcada',
            name='_prova',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.ProvaMarcada'),
        ),
        migrations.AddField(
            model_name='provaareamarcada',
            name='area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='escola.AreaConhecimento'),
        ),
        migrations.AddField(
            model_name='materiadaturma',
            name='area',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='materias', to='escola.AreaConhecimento'),
        ),
    ]
