# Generated by Django 2.2.4 on 2019-10-31 12:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='DiaEmProfessor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dia', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Dia')),
            ],
        ),
        migrations.CreateModel(
            name='DiaEmTurma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dia', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Dia')),
            ],
        ),
        migrations.CreateModel(
            name='Disciplina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Grupo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='GrupoEmTurma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grupo', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Grupo')),
            ],
        ),
        migrations.CreateModel(
            name='Periodo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=128)),
                ('dias_livres', models.ManyToManyField(through='web.DiaEmProfessor', to='web.Dia')),
            ],
        ),
        migrations.CreateModel(
            name='ProfessorEmTurma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('professor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Professor')),
            ],
        ),
        migrations.CreateModel(
            name='Turma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(blank=True, max_length=128, null=True)),
                ('dias', models.ManyToManyField(blank=True, through='web.DiaEmTurma', to='web.Dia')),
                ('disciplina', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Disciplina')),
                ('grupo', models.ManyToManyField(blank=True, through='web.GrupoEmTurma', to='web.Grupo')),
                ('periodo', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Periodo')),
                ('professor', models.ManyToManyField(through='web.ProfessorEmTurma', to='web.Professor')),
            ],
        ),
        migrations.AddField(
            model_name='professoremturma',
            name='turma',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Turma'),
        ),
        migrations.AddField(
            model_name='grupoemturma',
            name='turma',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Turma'),
        ),
        migrations.AddField(
            model_name='diaemturma',
            name='turma',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Turma'),
        ),
        migrations.AddField(
            model_name='diaemprofessor',
            name='professor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='web.Professor'),
        ),
    ]
