# Generated by Django 5.2.7 on 2026-02-02 02:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0032_parceltype_parcel_parcel_type'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='platformprofile',
            name='enable_auto_ban_on_warnings',
            field=models.BooleanField(default=False, help_text='Automatically ban drivers who exceed a certain number of warnings.', verbose_name='Enable Auto-Ban on Warnings'),
        ),
        migrations.AddField(
            model_name='platformprofile',
            name='max_warnings_before_ban',
            field=models.PositiveIntegerField(default=3, help_text='Number of warnings allowed before auto-ban.', verbose_name='Max Warnings Before Ban'),
        ),
        migrations.CreateModel(
            name='DriverWarning',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField(verbose_name='Reason for Warning')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='warnings', to=settings.AUTH_USER_MODEL, verbose_name='Driver')),
            ],
            options={
                'verbose_name': 'Driver Warning',
                'verbose_name_plural': 'Driver Warnings',
                'ordering': ['-created_at'],
            },
        ),
    ]
