# Generated by Django 2.2.4 on 2019-08-17 21:25

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Ocorrencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contrato_numero', models.CharField(max_length=255)),
                ('contrato_projeto', models.IntegerField(blank=True, null=True)),
                ('contrato_lote', models.IntegerField(blank=True, null=True)),
                ('componente', models.CharField(max_length=60)),
                ('contrato_valor', models.FloatField(blank=True, null=True)),
                ('fotos', models.URLField(blank=True, null=True)),
                ('status', models.SmallIntegerField(choices=[(0, 'Fila de Análise'), (1, 'É uma ocorrencia'), (2, 'Não é uma ocorrencia')], default=0)),
            ],
            options={
                'verbose_name': '4 - Lista de Ocorrências',
                'verbose_name_plural': '4 - Lista de Ocorrências',
            },
        ),
        migrations.CreateModel(
            name='SimuladoFornecedor',
            fields=[
                ('nome', models.CharField(max_length=255)),
                ('cnpj', models.CharField(max_length=14, primary_key=True, serialize=False)),
            ],
            options={
                'verbose_name': '3 - Lista de Fornecedores',
                'verbose_name_plural': '3 - Lista de Fornecedores',
            },
        ),
        migrations.CreateModel(
            name='SimuladoProfissionais',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=60)),
                ('cpf', models.CharField(max_length=11)),
            ],
            options={
                'verbose_name': '2 - Lista de Profissionais',
                'verbose_name_plural': '2 - Lista de Profissionais',
            },
        ),
        migrations.RemoveField(
            model_name='simuladocomponente',
            name='origem_crea',
        ),
        migrations.RemoveField(
            model_name='simuladoempresacrea',
            name='endereco',
        ),
        migrations.RemoveField(
            model_name='simuladoempresacrea',
            name='profissionais',
        ),
        migrations.RemoveField(
            model_name='simuladoresponsaveistecnicos',
            name='formacao',
        ),
        migrations.AlterModelOptions(
            name='simuladoformacao',
            options={'verbose_name': '1 - Lista de Formações', 'verbose_name_plural': '1 - Lista de Formações'},
        ),
        migrations.RemoveField(
            model_name='simuladoformacao',
            name='componente_permissao',
        ),
        migrations.AddField(
            model_name='simuladoformacao',
            name='nome',
            field=models.CharField(blank=True, max_length=60, null=True),
        ),
        migrations.AlterField(
            model_name='simuladoformacao',
            name='descricao',
            field=models.TextField(),
        ),
        migrations.DeleteModel(
            name='ObrasEmAndamento',
        ),
        migrations.DeleteModel(
            name='SimuladoComponente',
        ),
        migrations.DeleteModel(
            name='SimuladoEmpresaCrea',
        ),
        migrations.DeleteModel(
            name='SimuladoEndereco',
        ),
        migrations.DeleteModel(
            name='SimuladoModalidade',
        ),
        migrations.DeleteModel(
            name='SimuladoResponsaveisTecnicos',
        ),
        migrations.AddField(
            model_name='simuladoprofissionais',
            name='titulos',
            field=models.ManyToManyField(to='app_login.SimuladoFormacao'),
        ),
        migrations.AddField(
            model_name='simuladofornecedor',
            name='profissionais',
            field=models.ManyToManyField(to='app_login.SimuladoProfissionais'),
        ),
        migrations.AddField(
            model_name='ocorrencia',
            name='fornecedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app_login.SimuladoFornecedor'),
        ),
        migrations.AlterUniqueTogether(
            name='ocorrencia',
            unique_together={('fornecedor', 'contrato_numero', 'contrato_projeto', 'contrato_lote')},
        ),
    ]
