# Generated by Django 4.2.14 on 2025-03-19 12:20

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


class Migration(migrations.Migration):

    dependencies = [
        ('base', '0018_merge_20250307_1944'),
    ]

    operations = [
        migrations.CreateModel(
            name='TriggerDefinition',
            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)),
                ('type', models.CharField(choices=[('named-event', 'Named Event'), ('periodic', 'Periodic'), ('data-changed', 'Data Changed'), ('data-added', 'Data Added'), ('data-modified', 'Data Modified'), ('data-removed', 'Data Removed'), ('data-accessed', 'Data Accessed'), ('data-accessed-ended', 'Data Accessed Ended')], max_length=255, null=True)),
                ('name', models.CharField(max_length=255, null=True)),
                ('timing_date', models.DateField(null=True)),
                ('timing_date_time', models.DateTimeField(null=True)),
                ('code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='trigger_definition_code', to='base.codeableconcept')),
                ('condition', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='trigger_definition_condition', to='base.expression')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
