# Generated by Django 6.0.4 on 2026-06-16 04:00

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


class Migration(migrations.Migration):

    dependencies = [
        ('procurements', '0003_invoice_match_status'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='approval',
            options={'ordering': ['requisition', 'level', 'created_at']},
        ),
        migrations.AddField(
            model_name='approval',
            name='level',
            field=models.PositiveSmallIntegerField(default=1),
        ),
        migrations.AddField(
            model_name='approval',
            name='required_role',
            field=models.CharField(blank=True, max_length=80),
        ),
        migrations.AlterField(
            model_name='approval',
            name='approver',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='requisition_approvals', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='approval',
            name='status',
            field=models.CharField(choices=[('blocked', 'Blocked'), ('pending', 'Pending'), ('approved', 'Approved'), ('rejected', 'Rejected'), ('cancelled', 'Cancelled')], default='pending', max_length=20),
        ),
        migrations.AddIndex(
            model_name='approval',
            index=models.Index(fields=['requisition', 'level'], name='requisition_requisi_7b52eb_idx'),
        ),
    ]
