# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-19 23:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Empresas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idEmpresa', models.IntegerField(blank=True, null=True)),
                ('endereco', models.CharField(max_length=150)),
                ('ramo', models.CharField(choices=[('1', 'Supermercados'), ('2', 'Textil'), ('3', 'Postos de Combustiveis'), ('4', 'Acougues')], max_length=20)),
                ('cnpj', models.CharField(max_length=18)),
                ('telefone', models.CharField(max_length=15)),
                ('nome', models.CharField(max_length=50)),
                ('nomeFantasia', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Fiscalizacoes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idFisc', models.IntegerField(blank=True, null=True)),
                ('data', models.DateField(blank=True, null=True)),
                ('descricaoFiscalizacao', models.CharField(max_length=250)),
                ('parecer', models.CharField(choices=[('0', 'Regular'), ('1', 'Irregular')], max_length=20)),
                ('observacao', models.CharField(max_length=250)),
                ('tipoFiscalizacao', models.CharField(choices=[('1', 'Precos'), ('2', 'Cumprimento de Lei')], max_length=20)),
                ('idEmpresa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Empresas')),
            ],
        ),
        migrations.CreateModel(
            name='OrgaoDePesquisa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='OrgaosFiscalizadores',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idOrgao', models.IntegerField(blank=True, null=True)),
                ('nomeOrgao', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=50)),
                ('nomeContato', models.CharField(max_length=50)),
                ('telefone', models.CharField(max_length=15)),
                ('diretor', models.CharField(max_length=50)),
                ('telefoneContato', models.CharField(max_length=15)),
                ('endereco', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Pesquisas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idPesquisa', models.IntegerField(blank=True, null=True)),
                ('data', models.DateField(blank=True, null=True)),
                ('descricaoPesquisa', models.CharField(max_length=250)),
                ('responsavel', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Precos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('preco', models.DecimalField(decimal_places=2, max_digits=10)),
                ('idEmpresa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Empresas')),
                ('idPesquisa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Pesquisas')),
            ],
        ),
        migrations.CreateModel(
            name='Produtos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idProduto', models.IntegerField(blank=True, null=True)),
                ('nome', models.CharField(max_length=50)),
                ('descricaoProduto', models.CharField(max_length=250)),
                ('tipoProduto', models.CharField(choices=[('1', 'Alimentos'), ('2', 'Limpeza'), ('3', 'Frios'), ('4', 'Escritorio')], max_length=20)),
                ('categoriaProduto', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ProdutosDasEmpresas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idEmpresa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Empresas')),
                ('idProduto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Produtos')),
            ],
        ),
        migrations.AddField(
            model_name='precos',
            name='idProduto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Produtos'),
        ),
        migrations.AddField(
            model_name='orgaodepesquisa',
            name='idOrgao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.OrgaosFiscalizadores'),
        ),
        migrations.AddField(
            model_name='orgaodepesquisa',
            name='idPesquisa',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.Pesquisas'),
        ),
        migrations.AddField(
            model_name='fiscalizacoes',
            name='idOrgao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sisprocon.OrgaosFiscalizadores'),
        ),
    ]
