# Generated by Django 4.2.14 on 2025-02-19 12:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('patients', '0007_patientorganizationreference'),
        ('base', '0014_signaturewhenreference_signatureonbehalfofreference_and_more'),
        ('contracts', '0002_remove_contract_rule_contract_rule'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContractSubjectReference',
            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='subject_reference_identifier', to='base.identifier')),
                ('patient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subject_reference_patient', to='patients.patient')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterField(
            model_name='contract',
            name='subject',
            field=models.ManyToManyField(blank=True, related_name='contract_subject', to='contracts.contractsubjectreference'),
        ),
    ]
