# Generated by Django 3.1.6 on 2021-02-05 18:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(help_text='Informe o nome', max_length=60, verbose_name='Nome')),
                ('celular', models.CharField(help_text='Informe o celular', max_length=60, verbose_name='Celular')),
                ('email', models.CharField(help_text='Informe o e-mail', max_length=60, verbose_name='E-mail')),
            ],
            options={
                'verbose_name': 'Cliente',
                'verbose_name_plural': 'Clientes',
            },
        ),
        migrations.CreateModel(
            name='Corretor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(help_text='Informe o nome', max_length=35, verbose_name='Nome')),
                ('celular', models.CharField(help_text='Informe o celular', max_length=35, verbose_name='Celular')),
                ('email', models.CharField(help_text='Informe o e-mail', max_length=35, verbose_name='E-mail')),
                ('foto', stdimage.models.StdImageField(upload_to='corretores', verbose_name='Foto')),
            ],
            options={
                'verbose_name': 'Corretor',
                'verbose_name_plural': 'Corretores',
            },
        ),
        migrations.CreateModel(
            name='Imovel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.CharField(help_text='Informe o código do imóvel', max_length=6, verbose_name='Código')),
                ('endereco', models.CharField(help_text='Informe o endereço do imóvel', max_length=250, verbose_name='Endereço')),
                ('valor_venda', models.CharField(help_text='Informe o valor de venda', max_length=10, verbose_name='Valor de venda')),
                ('iptu', models.CharField(help_text='Informe o valor do IPTU', max_length=10, verbose_name='Valor do IPTU')),
                ('condominio', models.CharField(help_text='Informe o  valor do condomínio', max_length=10, verbose_name='Valor do condomínio')),
                ('area_total', models.CharField(help_text='Informe a área total do imóvel', max_length=20, verbose_name='Área total')),
                ('area_privativa', models.CharField(help_text='Informe a área privativa do imóvel', max_length=20, verbose_name='Área privativa')),
                ('area_util', models.CharField(help_text='Informe a área útil do imóvel', max_length=20, verbose_name='Área útil')),
                ('descricao', models.CharField(help_text='Descreva o imóvel', max_length=250, verbose_name='Descrição do imóvel')),
                ('num_quarto', models.CharField(help_text='Informe a número de quartos', max_length=10, verbose_name='Número de quartos')),
                ('num_banheiro', models.CharField(help_text='Informe a número de banheiros', max_length=10, verbose_name='Número de banheiros')),
                ('num_garagem', models.CharField(help_text='Informe a número de vagas de garagem', max_length=10, verbose_name='Número de vagas de garagem')),
                ('tipo', models.CharField(help_text='Informe o tipo de imóvel', max_length=35, verbose_name='Tipo')),
                ('status', models.CharField(help_text='Informe o status do imóvel', max_length=35, verbose_name='Status')),
                ('comodidade', models.CharField(help_text='Informe as comodidades do imóvel', max_length=250, verbose_name='Comodidades')),
                ('foto', stdimage.models.StdImageField(upload_to='imoveis', verbose_name='Foto')),
            ],
            options={
                'verbose_name': 'Imóvel',
                'verbose_name_plural': 'Imóveis',
            },
        ),
        migrations.CreateModel(
            name='Proprietario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(help_text='Informe o nome', max_length=60, verbose_name='Nome')),
                ('celular', models.CharField(help_text='Informe o celular', max_length=60, verbose_name='Celular')),
                ('email', models.CharField(help_text='Informe o e-mail', max_length=60, verbose_name='E-mail')),
            ],
            options={
                'verbose_name': 'Proprietário',
                'verbose_name_plural': 'Proprietários',
            },
        ),
        migrations.CreateModel(
            name='Visita',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateField(help_text='Data da visita', verbose_name='data')),
                ('hora', models.TimeField(help_text='Hora da visita', verbose_name='hora')),
                ('cliente', models.ForeignKey(help_text='Selecione o Cliente', on_delete=django.db.models.deletion.CASCADE, related_name='cliente_fk', to='sistema.cliente', verbose_name='Cliente')),
                ('corretor', models.ForeignKey(help_text='Selecione o Corretor', on_delete=django.db.models.deletion.CASCADE, related_name='corretor_fk', to='sistema.corretor', verbose_name='Corretor')),
                ('imovel', models.ForeignKey(help_text='Selecione o Imóvel', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='imovel_fk', to='sistema.imovel', verbose_name='Imóvel')),
            ],
            options={
                'verbose_name': 'Visita',
                'verbose_name_plural': 'Visitas',
                'ordering': ['data', 'hora'],
            },
        ),
        migrations.AddField(
            model_name='imovel',
            name='proprietario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sistema.proprietario', verbose_name='Proprietário'),
        ),
    ]
