# Generated by Django 6.0.1 on 2026-06-08 11:01

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


class Migration(migrations.Migration):

    dependencies = [
        ('organizations', '0012_department_hr_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='SubSection',
            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)),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('pending', 'Pending'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], db_index=True, default='active', max_length=20)),
                ('champion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='champion_subsections', to='organizations.staff')),
                ('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subsections', to='organizations.section')),
            ],
            options={
                'verbose_name': 'SubSection',
                'verbose_name_plural': 'SubSections',
                'db_table': 'organizations_subsection_new',
                'ordering': ['section', 'name_en'],
                'unique_together': {('section', 'code')},
            },
        ),
    ]
