# Generated by Django 6.0.1 on 2026-01-15 12:02 import django.db.models.deletion import uuid from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('organizations', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='QIProjectTask', fields=[ ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('title', models.CharField(max_length=500)), ('description', models.TextField(blank=True)), ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('pending', 'Pending'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='pending', max_length=20)), ('due_date', models.DateField(blank=True, null=True)), ('completed_date', models.DateField(blank=True, null=True)), ('order', models.IntegerField(default=0)), ], options={ 'ordering': ['project', 'order'], }, ), migrations.CreateModel( name='QIProject', fields=[ ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('name', models.CharField(max_length=200)), ('name_ar', models.CharField(blank=True, max_length=200)), ('description', models.TextField()), ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('pending', 'Pending'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], db_index=True, default='pending', max_length=20)), ('start_date', models.DateField(blank=True, null=True)), ('target_completion_date', models.DateField(blank=True, db_index=True, null=True)), ('actual_completion_date', models.DateField(blank=True, null=True)), ('outcome_description', models.TextField(blank=True)), ('success_metrics', models.JSONField(blank=True, default=dict, help_text='Success metrics and results')), ('metadata', models.JSONField(blank=True, default=dict)), ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='qi_projects', to='organizations.department')), ('hospital', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='qi_projects', to='organizations.hospital')), ('project_lead', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='led_projects', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-created_at'], }, ), ]