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

import django.contrib.postgres.fields
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0001_initial'),
        ('endpoints', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Organization',
            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)),
                ('name', models.CharField(max_length=255)),
                ('alias', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=255), null=True, size=None)),
                ('website', models.URLField(null=True)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('active', 'Active'), ('inactive', 'Inactive')], default='pending', max_length=50)),
                ('active', models.BooleanField(default=True)),
                ('description', models.TextField(null=True)),
                ('contact', models.ManyToManyField(blank=True, related_name='organization_contact', to='base.extendedcontactdetail')),
                ('endpoint', models.ManyToManyField(blank=True, related_name='organization_endpoint', to='endpoints.endpointreference')),
                ('identifier', models.ManyToManyField(blank=True, related_name='organization_identifier', to='base.identifier')),
                ('part_of', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_part_of', to='base.organizationreference')),
                ('qualification', models.ManyToManyField(blank=True, related_name='organization_qualification', to='base.qualification')),
                ('type', models.ManyToManyField(blank=True, related_name='organization_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OrganizationCodeableReference',
            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)),
                ('concept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_codeable_concept_concept', to='base.codeableconcept')),
                ('reference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='organization_codeable_concept_reference', to='base.organizationreference')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
