# Generated by Django 3.1.1 on 2020-09-22 23:52

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='consulta',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='agenda',
            name='horarios',
            field=models.ManyToManyField(related_name='agenda', to='core.Horario'),
        ),
        migrations.AddField(
            model_name='agenda',
            name='medico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='agenda', to='core.medico'),
        ),
        migrations.AlterUniqueTogether(
            name='medico',
            unique_together={('nome', 'crm')},
        ),
        migrations.AlterUniqueTogether(
            name='consulta',
            unique_together={('data', 'horario', 'medico')},
        ),
    ]
