# Generated by Django 6.0.1 on 2026-06-07 04:37 import django.db.models.deletion import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organizations', '0010_section_add_roles_display_names'), ] operations = [ migrations.CreateModel( name='Area', 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_en', models.CharField(max_length=200)), ('name_ar', models.CharField(blank=True, max_length=200)), ('code', models.CharField(blank=True, max_length=100)), ('location_type', models.CharField(blank=True, choices=[('OP', 'Outpatient'), ('IP', 'Inpatient'), ('ER', 'Emergency'), ('GENERAL', 'General')], help_text='Location type (OP/IP/ER/GO)', max_length=20)), ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('pending', 'Pending'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='active', max_length=20)), ('hospital', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='areas', to='organizations.hospital')), ], options={ 'unique_together': {('hospital', 'code')}, }, ), migrations.AddField( model_name='department', name='area', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='departments', to='organizations.area'), ), ]