# Generated by Django 5.2 on 2025-04-23 12:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0004_initial'),
        ('groups', '0001_initial'),
        ('organizations', '0001_initial'),
        ('patients', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PersonalRelationshipSourceReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PersonalRelationship',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('asserter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationships_asserter', to='base.organizationreference')),
                ('confidence', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationships_confidence', to='base.codeableconcept')),
                ('group', models.ManyToManyField(blank=True, related_name='personal_relationships_group', to='groups.groupreference')),
                ('period', models.ManyToManyField(blank=True, related_name='personal_relationships_period', to='base.period')),
                ('relationship_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationships_relationship_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PersonalRelationshipAsserterReference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('reference', models.CharField(max_length=255, null=True)),
                ('type', models.CharField(max_length=255, null=True)),
                ('display', models.CharField(max_length=255, null=True)),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationship_asserter_reference_identifier', to='base.identifier')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationship_asserter_reference_organization', to='organizations.organization')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='personal_relationship_asserter_reference_patient', to='patients.patient')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
