# Generated by Django 3.2.9 on 2022-01-10 11:40

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import mycarehub.common.models.base_models
import mycarehub.users.models
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('common', '0015_faq'),
        ('clients', '0017_auto_20211126_1201'),
    ]

    operations = [
        migrations.CreateModel(
            name='Caregiver',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(default=django.utils.timezone.now)),
                ('created_by', models.UUIDField(blank=True, null=True)),
                ('updated', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_by', models.UUIDField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('first_name', models.TextField()),
                ('last_name', models.TextField()),
                ('caregiver_type', models.CharField(choices=[('FATHER', 'Father'), ('MOTHER', 'Mother'), ('SIBLING', 'Sibling')], max_length=64)),
                ('phone_number', models.TextField(blank=True, max_length=14, null=True)),
                ('organisation', models.ForeignKey(default=mycarehub.users.models.default_organisation, on_delete=django.db.models.deletion.PROTECT, related_name='clients_caregiver_related', to='common.organisation')),
            ],
            options={
                'ordering': ('-updated', '-created'),
                'abstract': False,
            },
            managers=[
                ('objects', mycarehub.common.models.base_models.AbstractBaseManager()),
            ],
        ),
        migrations.AddField(
            model_name='client',
            name='caregiver',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='client_caregiver', to='clients.caregiver'),
        ),
    ]
