# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-10 13:28
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='Consulta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateTimeField(verbose_name='Data da Consulta')),
                ('desconto', models.DecimalField(decimal_places=2, max_digits=20, verbose_name='Preço do desconto')),
                ('realizado', models.BooleanField(default=False, verbose_name='Procedimento realizado')),
            ],
            options={
                'ordering': ('data', 'paciente'),
            },
        ),
        migrations.CreateModel(
            name='Consultorio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome do consultório')),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Paciente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome do paciente')),
                ('cpf', models.CharField(max_length=12, verbose_name='CPF')),
                ('data_cadastro', models.DateTimeField(auto_now_add=True, verbose_name='Data de cadastro')),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.CreateModel(
            name='Procedimento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=40, verbose_name='Nome do procedimento')),
                ('descricao', models.CharField(max_length=1024, verbose_name='Descrição do procedimento')),
                ('preco_base', models.DecimalField(decimal_places=2, max_digits=20, verbose_name='Preço base do procedimento')),
            ],
            options={
                'ordering': ('nome', 'preco_base'),
            },
        ),
        migrations.CreateModel(
            name='Profissional',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome do profissional')),
                ('cpf', models.CharField(max_length=12, verbose_name='CPF')),
                ('cre', models.CharField(max_length=12, verbose_name='CRE')),
                ('date_cadastro', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('nome',),
            },
        ),
        migrations.AddField(
            model_name='procedimento',
            name='profissionais',
            field=models.ManyToManyField(to='gerenciador.Profissional'),
        ),
        migrations.AddField(
            model_name='consulta',
            name='paciente',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gerenciador.Paciente'),
        ),
        migrations.AddField(
            model_name='consulta',
            name='procedimento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gerenciador.Procedimento'),
        ),
    ]
