# 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'),
    ]

    operations = [
        migrations.CreateModel(
            name='EndpointPayload',
            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)),
                ('mime_type', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=255), null=True, size=None)),
                ('profile_uri', models.CharField(max_length=255, null=True)),
                ('type', models.ManyToManyField(blank=True, related_name='endpoint_payload_type', to='base.codeableconcept')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Endpoint',
            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)),
                ('status', models.CharField(choices=[('active', 'active'), ('limited', 'limited'), ('suspended', 'suspended'), ('error', 'error'), ('off', 'off'), ('entered-in-error', 'entered-in-error')], max_length=255, null=True)),
                ('name', models.CharField(max_length=255, null=True)),
                ('description', models.TextField(null=True)),
                ('address', models.CharField(max_length=255, null=True)),
                ('header', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=255), null=True, size=None)),
                ('availability', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='endpoint_availability', to='base.availability')),
                ('connection_type', models.ManyToManyField(blank=True, related_name='endpoint_connection_type', to='base.codeableconcept')),
                ('contact', models.ManyToManyField(blank=True, related_name='endpoint_contact', to='base.contactpoint')),
                ('environmental_type', models.ManyToManyField(blank=True, related_name='endpoint_environmental_type', to='base.codeableconcept')),
                ('identifier', models.ManyToManyField(blank=True, related_name='endpoint_identifier', to='base.identifier')),
                ('managing_organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='endpoint_managing_organization', to='base.organizationreference')),
                ('period', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='endpoint_period', to='base.period')),
                ('payload', models.ManyToManyField(blank=True, related_name='endpoint_payload', to='endpoints.endpointpayload')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EndpointReference',
            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)),
                ('endpoint', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='endpoint_reference', to='endpoints.endpoint')),
                ('identifier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='endpoint_reference_identifier', to='base.identifier')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
