# Generated by Django 2.1.2 on 2018-10-08 18:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('usuarios', '0001_initial'),
        ('catalogo', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Orcamento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descartar', models.BooleanField(default=False)),
                ('descricao', models.TextField(verbose_name='Descrição')),
                ('valor', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Valor')),
                ('prestador', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='usuarios.Prestador')),
            ],
            options={
                'verbose_name': 'Orçamento',
                'verbose_name_plural': 'Orçamentos',
            },
        ),
        migrations.CreateModel(
            name='Solicitacao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, 'Solicitado'), (1, 'Aguardando prestador'), (2, 'Cancelado pelo cliente'), (3, 'Cancelado pelo prestador'), (4, 'Aguardando pagamento'), (5, 'Concluido')], default=0, verbose_name='Status')),
                ('descricao', models.TextField(verbose_name='Descricao')),
                ('hora_solicitacao', models.DateTimeField(auto_now_add=True)),
                ('hora_aceitacao', models.DateTimeField(auto_now=True)),
                ('avaliado', models.BooleanField(default=False)),
                ('prestador_avaliou', models.BooleanField(default=False)),
                ('cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Cliente', to='usuarios.Cliente')),
                ('endereco', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='usuarios.Endereco', verbose_name='Endereço')),
                ('orcamento_aceito', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orcamento_aceito', to='orcamentos.Orcamento')),
                ('servico', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogo.Servico')),
            ],
            options={
                'verbose_name': 'Solicitação',
                'verbose_name_plural': 'Solicitações',
            },
        ),
        migrations.AddField(
            model_name='orcamento',
            name='solicitacao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orcamentos.Solicitacao'),
        ),
    ]
