# Generated by Django 4.2.11 on 2024-06-10 14:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('endoreg_db', '0052_rename_case_template_type_casetemplate_template_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='PatientLabSampleType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('name_de', models.CharField(max_length=255, null=True)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('description', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='PatientLabSample',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lab_samples', to='endoreg_db.patient')),
                ('sample_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.patientlabsampletype')),
            ],
        ),
        migrations.AddField(
            model_name='patientlabvalue',
            name='sample',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.patientlabsample'),
        ),
    ]
