# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-05-01 13:17
from __future__ import unicode_literals

import core.models.managers.UsuarioManager
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('ra', models.IntegerField(unique=True, verbose_name='RA')),
                ('nome', models.CharField(blank=True, max_length=100, verbose_name='Nome')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='E-Mail')),
                ('ativo', models.BooleanField(default=True, verbose_name='Ativo')),
                ('perfil', models.CharField(choices=[('A', 'Aluno'), ('P', 'Professor'), ('C', 'Coordenador')], default='C', max_length=1, verbose_name='Perfil')),
                ('password', models.CharField(max_length=150)),
            ],
            options={
                'db_table': 'Usuario',
            },
            managers=[
                ('objects', core.models.managers.UsuarioManager.UsuarioManager()),
            ],
        ),
        migrations.CreateModel(
            name='ArquivosFoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arquivo', models.CharField(max_length=10000)),
            ],
            options={
                'db_table': 'ArquivosFoto',
            },
        ),
        migrations.CreateModel(
            name='ArquivosQuestao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arquivo', models.CharField(max_length=500)),
            ],
            options={
                'db_table': 'ArquivosQuestao',
            },
        ),
        migrations.CreateModel(
            name='ArquivosResposta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arquivo', models.CharField(max_length=500)),
            ],
            options={
                'db_table': 'ArquivosResposta',
            },
        ),
        migrations.CreateModel(
            name='Candidato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=120, null=True)),
                ('ra', models.CharField(max_length=80, null=True)),
                ('email', models.CharField(max_length=80, null=True)),
                ('celular', models.CharField(max_length=11, null=True)),
                ('codigo_acesso', models.CharField(max_length=120, null=True)),
                ('matricula_aceita', models.BooleanField(default=False)),
                ('confirmado', models.BooleanField(default=False)),
                ('foto', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='candidatos', to='core.ArquivosFoto')),
            ],
            options={
                'db_table': 'Candidado',
            },
        ),
        migrations.CreateModel(
            name='Curso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sigla', models.CharField(max_length=5, unique=True)),
                ('nome', models.CharField(max_length=50, unique=True)),
            ],
            options={
                'db_table': 'Curso',
            },
        ),
        migrations.CreateModel(
            name='Disciplina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=240)),
                ('carga_horaria', models.SmallIntegerField()),
                ('teoria', models.DecimalField(decimal_places=2, max_digits=3)),
                ('pratica', models.DecimalField(decimal_places=2, max_digits=3)),
                ('ementa', models.TextField()),
                ('competencias', models.TextField()),
                ('habilidades', models.TextField()),
                ('conteudo', models.TextField()),
                ('bibliografia_complementar', models.TextField()),
                ('bibliografia_basica', models.TextField()),
            ],
            options={
                'db_table': 'Disciplina',
            },
        ),
        migrations.CreateModel(
            name='DisciplinaOfertada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ano', models.SmallIntegerField()),
                ('semestre', models.CharField(max_length=1)),
                ('disciplina', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='disciplinasOfertadas', to='core.Disciplina')),
            ],
            options={
                'db_table': 'DisciplinaOfertada',
            },
        ),
        migrations.CreateModel(
            name='GradeCurricular',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ano', models.SmallIntegerField()),
                ('semestre', models.CharField(max_length=1)),
                ('curso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gradesCurriculares', to='core.Curso')),
            ],
            options={
                'db_table': 'GradeCurricular',
            },
        ),
        migrations.CreateModel(
            name='Periodo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.SmallIntegerField()),
                ('disciplinas', models.ManyToManyField(db_table='PeriodoDisicplina', related_name='periodos', to='core.Disciplina')),
                ('gradeCurricular', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='periodos', to='core.GradeCurricular')),
            ],
            options={
                'db_table': 'Periodo',
            },
        ),
        migrations.CreateModel(
            name='Questao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.TextField()),
                ('data_limite_entrega', models.DateField()),
                ('numero', models.IntegerField()),
                ('data', models.DateField()),
            ],
            options={
                'db_table': 'Questao',
            },
        ),
        migrations.CreateModel(
            name='Resposta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_avaliacao', models.DateField(blank=True, null=True)),
                ('nota', models.DecimalField(decimal_places=2, max_digits=4, null=True)),
                ('avaliacao', models.TextField(null=True)),
                ('descricao', models.TextField()),
                ('data_de_envio', models.DateField()),
                ('questao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='respostas', to='core.Questao')),
            ],
            options={
                'db_table': 'Resposta',
            },
        ),
        migrations.CreateModel(
            name='Turma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('turno', models.CharField(max_length=15)),
                ('turma_sigla', models.CharField(max_length=1)),
                ('cursos', models.ManyToManyField(db_table='CursoTurma', related_name='turmas', to='core.Curso')),
                ('disciplinaOfertada', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='turmas', to='core.DisciplinaOfertada')),
            ],
            options={
                'db_table': 'Turma',
            },
        ),
        migrations.CreateModel(
            name='Aluno',
            fields=[
                ('usuario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('celular', models.CharField(blank=True, max_length=11, null=True)),
                ('curso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alunos', to='core.Curso')),
                ('foto', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='alunos', to='core.ArquivosFoto')),
            ],
            options={
                'db_table': 'Aluno',
            },
            bases=('core.usuario',),
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('usuario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('apelido', models.CharField(max_length=30, null=True, unique=True)),
                ('celular', models.CharField(max_length=11)),
            ],
            options={
                'db_table': 'Professor',
            },
            bases=('core.usuario',),
        ),
        migrations.AddField(
            model_name='questao',
            name='turma',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questoes', to='core.Turma'),
        ),
        migrations.AddField(
            model_name='candidato',
            name='turma',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='candidatos', to='core.Turma'),
        ),
        migrations.AddField(
            model_name='arquivosresposta',
            name='resposta',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arquivosResposta', to='core.Resposta'),
        ),
        migrations.AddField(
            model_name='arquivosquestao',
            name='questao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arquivosQuestao', to='core.Questao'),
        ),
        migrations.AddField(
            model_name='turma',
            name='professor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='turmas', to='core.Professor'),
        ),
        migrations.AddField(
            model_name='resposta',
            name='aluno',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='respostas', to='core.Aluno'),
        ),
        migrations.AddField(
            model_name='candidato',
            name='aluno',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='candidatos', to='core.Aluno'),
        ),
        migrations.AddField(
            model_name='aluno',
            name='turmas',
            field=models.ManyToManyField(blank=True, db_table='Matricula', related_name='alunos', to='core.Turma'),
        ),
    ]
