# Generated by Django 6.0.4 on 2026-06-16 11:33

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


class Migration(migrations.Migration):

    dependencies = [
        ('asset_management', '0004_procurement_requisition'),
        ('procurements', '0005_requisition_budget_item'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='requisitionquote',
            name='award_reason',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='requisitionquote',
            name='awarded_at',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='requisitionquote',
            name='awarded_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='awarded_quotes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddConstraint(
            model_name='requisitionquote',
            constraint=models.UniqueConstraint(condition=models.Q(('is_selected', True)), fields=('requisition',), name='uniq_awarded_quote_per_requisition'),
        ),
    ]
