# 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', '0001_initial'),
        ('endpoints', '0001_initial'),
        ('healthcareservices', '0001_initial'),
        ('locations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='OrganizationAffiliation',
            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)),
                ('active', models.BooleanField(default=True)),
                ('code', models.ManyToManyField(blank=True, related_name='organization_affiliation_code', to='base.codeableconcept')),
                ('contact', models.ManyToManyField(blank=True, related_name='organization_affiliation_contact', to='base.extendedcontactdetail')),
                ('endpoint', models.ManyToManyField(blank=True, related_name='organization_affiliation_endpoint', to='endpoints.endpointreference')),
                ('healthcare_service', models.ManyToManyField(blank=True, related_name='organization_affiliation_healthcare_service', to='healthcareservices.healthcareservicereference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='organization_affiliations', to='base.identifier')),
                ('location', models.ManyToManyField(blank=True, related_name='organization_affiliation_location', to='locations.locationreference')),
                ('network', models.ManyToManyField(blank=True, related_name='network_organization_affiliations', to='base.organizationreference')),
                ('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organization_affiliations', to='base.organizationreference')),
                ('participating_organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='participating_organization_affiliations', to='base.organizationreference')),
                ('period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organization_affiliations_period', to='base.period')),
                ('specialty', models.ManyToManyField(blank=True, related_name='organization_affiliation_specialty', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OrganizationAffiliationReference',
            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.SET_NULL, related_name='organization_affiliation_references_identifier', to='base.identifier')),
                ('organization_affiliation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organization_affiliation_references_organization_affiliation', to='organizationaffiliations.organizationaffiliation')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
