# Generated by Django 5.2.7 on 2026-02-01 13:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0029_driverreport'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='platformprofile',
            name='auto_ban_on_rejections',
            field=models.BooleanField(default=False, help_text='Automatically ban drivers who exceed a certain number of rejections.', verbose_name='Enable Auto-Ban on Rejections'),
        ),
        migrations.AddField(
            model_name='platformprofile',
            name='rejection_limit',
            field=models.PositiveIntegerField(default=5, help_text='Number of rejections allowed before auto-ban.', verbose_name='Rejection Limit'),
        ),
        migrations.AddField(
            model_name='profile',
            name='ban_reason',
            field=models.TextField(blank=True, verbose_name='Ban Reason'),
        ),
        migrations.AddField(
            model_name='profile',
            name='is_banned',
            field=models.BooleanField(default=False, verbose_name='Banned'),
        ),
        migrations.CreateModel(
            name='DriverRejection',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField(verbose_name='Reason for Rejection')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rejections', to=settings.AUTH_USER_MODEL, verbose_name='Driver')),
                ('parcel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rejections', to='core.parcel', verbose_name='Parcel')),
            ],
            options={
                'verbose_name': 'Driver Rejection',
                'verbose_name_plural': 'Driver Rejections',
                'ordering': ['-created_at'],
            },
        ),
    ]
