# Generated by Django 5.2.7 on 2026-01-31 02:03

from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0022_notificationtemplate'),
    ]

    operations = [
        migrations.CreateModel(
            name='PricingRule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('min_distance', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Min Distance (km)')),
                ('max_distance', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Max Distance (km)')),
                ('min_weight', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Min Weight (kg)')),
                ('max_weight', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Max Weight (kg)')),
                ('price', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Price (OMR)')),
            ],
            options={
                'verbose_name': 'Pricing Rule',
                'verbose_name_plural': 'Pricing Rules',
                'ordering': ['min_distance', 'min_weight'],
            },
        ),
        migrations.AddField(
            model_name='parcel',
            name='delivery_lat',
            field=models.DecimalField(blank=True, decimal_places=16, max_digits=20, null=True, verbose_name='Delivery Latitude'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='delivery_lng',
            field=models.DecimalField(blank=True, decimal_places=16, max_digits=20, null=True, verbose_name='Delivery Longitude'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='distance_km',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10, verbose_name='Distance (km)'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='driver_amount',
            field=models.DecimalField(decimal_places=3, default=Decimal('0.000'), max_digits=10, verbose_name='Driver Amount (OMR)'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='pickup_lat',
            field=models.DecimalField(blank=True, decimal_places=16, max_digits=20, null=True, verbose_name='Pickup Latitude'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='pickup_lng',
            field=models.DecimalField(blank=True, decimal_places=16, max_digits=20, null=True, verbose_name='Pickup Longitude'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='platform_fee',
            field=models.DecimalField(decimal_places=3, default=Decimal('0.000'), max_digits=10, verbose_name='Platform Fee (OMR)'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='platform_fee_percentage',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5, verbose_name='Fee Percentage (%)'),
        ),
        migrations.AddField(
            model_name='platformprofile',
            name='google_maps_api_key',
            field=models.CharField(blank=True, help_text='API Key for Google Maps (Distance Matrix, Maps JS).', max_length=255, verbose_name='Google Maps API Key'),
        ),
        migrations.AddField(
            model_name='platformprofile',
            name='platform_fee_percentage',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), help_text='Percentage deducted from total trip price.', max_digits=5, verbose_name='Platform Fee (%)'),
        ),
        migrations.AlterField(
            model_name='parcel',
            name='price',
            field=models.DecimalField(decimal_places=3, default=Decimal('0.000'), max_digits=10, verbose_name='Total Price (OMR)'),
        ),
    ]
