# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-21 18:36
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):

    dependencies = [
        ('app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Alternativa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enunciado', models.TextField()),
                ('correta', models.BooleanField(default=False)),
                ('explicacao', models.TextField(blank=True, default=None, null=True)),
                ('imagem', models.ImageField(blank=True, null=True, upload_to='alt/%Y/%m/%d/')),
            ],
        ),
        migrations.CreateModel(
            name='Aluno',
            fields=[
                ('profile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='app.Profile')),
                ('nome', models.CharField(max_length=80)),
            ],
            bases=('app.profile',),
        ),
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uri', models.URLField()),
                ('descricao', models.CharField(default='', max_length=190)),
                ('attach_type', models.IntegerField(choices=[(1, 'You Tube Link')], default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Aula',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('assunto', models.CharField(max_length=255)),
                ('bimestre', models.IntegerField(choices=[(1, '1o. Bimestre'), (2, '2o. Bimestre'), (3, '3o. Bimestre'), (4, '4o. Bimestre')])),
                ('serie', models.IntegerField(choices=[(1, '1o. Ano [Fundamental]'), (2, '2o. Ano [Fundamental]'), (3, '3o. Ano [Fundamental]'), (4, '4o. Ano [Fundamental]'), (5, '5o. Ano [Fundamental]'), (6, '6o. Ano [Fundamental]'), (7, '7o. Ano [Fundamental]'), (8, '8o. Ano [Fundamental]'), (9, '9o. Ano [Fundamental]')])),
            ],
        ),
        migrations.CreateModel(
            name='Descritor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cod', models.CharField(max_length=5)),
                ('descricao', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Disciplina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=60)),
                ('is_prova_brasil', models.BooleanField(default=False, verbose_name='Prova Brasil')),
            ],
        ),
        migrations.CreateModel(
            name='Escola',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Exercicio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enunciado', models.TextField()),
                ('complemento', models.TextField(blank=True, default=None, null=True)),
                ('imagem', models.ImageField(blank=True, null=True, upload_to='res/%Y/%m/%d/')),
                ('aula', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Aula')),
                ('descritor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Descritor')),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('profile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='app.Profile')),
                ('nome', models.CharField(max_length=80)),
                ('escola', models.ManyToManyField(blank=True, to='app.Escola')),
            ],
            bases=('app.profile',),
        ),
        migrations.CreateModel(
            name='Responsavel',
            fields=[
                ('profile_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='app.Profile')),
                ('nome', models.CharField(max_length=80)),
            ],
            bases=('app.profile',),
        ),
        migrations.CreateModel(
            name='Resposta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alternativa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Alternativa')),
                ('aluno', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Aluno')),
                ('exercicio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Exercicio')),
            ],
        ),
        migrations.CreateModel(
            name='Turma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identificador', models.CharField(max_length=40)),
                ('descricao', models.CharField(max_length=200)),
                ('serie', models.IntegerField(choices=[(1, '1o. Ano [Fundamental]'), (2, '2o. Ano [Fundamental]'), (3, '3o. Ano [Fundamental]'), (4, '4o. Ano [Fundamental]'), (5, '5o. Ano [Fundamental]'), (6, '6o. Ano [Fundamental]'), (7, '7o. Ano [Fundamental]'), (8, '8o. Ano [Fundamental]'), (9, '9o. Ano [Fundamental]')], default=5)),
                ('alunos', models.ManyToManyField(to='app.Aluno')),
                ('escola', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Escola')),
                ('professores', models.ManyToManyField(to='app.Professor')),
            ],
        ),
        migrations.AlterField(
            model_name='profile',
            name='role',
            field=models.PositiveSmallIntegerField(blank=True, choices=[(1, 'Administrador'), (2, 'Professor Assistente'), (3, 'Aluno'), (4, 'Professor'), (5, 'Supervisor'), (6, 'Responsável')], null=True),
        ),
        migrations.AlterField(
            model_name='profile',
            name='user',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='aula',
            name='disciplina',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Disciplina'),
        ),
        migrations.AddField(
            model_name='attachment',
            name='aula',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='aulas', to='app.Aula'),
        ),
        migrations.AddField(
            model_name='aluno',
            name='responsaveis',
            field=models.ManyToManyField(blank=True, null=True, to='app.Responsavel'),
        ),
        migrations.AddField(
            model_name='alternativa',
            name='exercicio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alternativas', to='app.Exercicio'),
        ),
    ]
