# Generated by Django 5.2.11 on 2026-05-25 14:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('expat_life', '0042_alter_refundabledeposit_profile_type_and_more'),
        ('hosting_app', '0003_alter_hostvenue_city_alter_hostvenue_district'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='hostbookingrequestaddon',
            options={'verbose_name': 'Host Booking Request Add-on', 'verbose_name_plural': 'Host Booking Request Add-ons'},
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='add_on_amount_snapshot_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='booked_by_user',
            field=models.ForeignKey(blank=True, help_text='The actual user account that created this booking/order.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hosting_booking_requests', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='cancelled_at',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='client_type',
            field=models.CharField(choices=[('foreigner', 'Foreigner / Guest'), ('hosting_client', 'Hosting Client'), ('dating_partner', 'Dating Partner'), ('rental_owner', 'Rental Owner'), ('service_partner', 'Service Partner'), ('property_care_owner', 'Property Care Owner'), ('affiliate', 'Affiliate Partner'), ('other', 'Other')], default='foreigner', max_length=40),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='commission_rate_percent',
            field=models.DecimalField(decimal_places=2, default=Decimal('10.00'), max_digits=5),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='delivered_at',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='ensolanka_commission_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='host_business_name_snapshot',
            field=models.CharField(blank=True, max_length=255),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='host_net_amount_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='host_profile',
            field=models.ForeignKey(blank=True, help_text='Snapshot link to the hosting partner profile for faster dashboard filtering.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='booking_requests', to='hosting_app.hostprofile'),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='meal_amount_snapshot_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='meal_plan_title_snapshot',
            field=models.CharField(blank=True, max_length=255),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='package_amount_snapshot_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='package_title_snapshot',
            field=models.CharField(blank=True, max_length=255),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='payable_item',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='host_booking_request', to='expat_life.userpayableitem'),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='payment_reference_code',
            field=models.CharField(blank=True, help_text='Example: HOST_BOOKING_12', max_length=120),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='payment_status',
            field=models.CharField(choices=[('unpaid', 'Unpaid'), ('due', 'Due'), ('paid', 'Paid'), ('cancelled', 'Cancelled'), ('refunded', 'Refunded')], default='due', max_length=30),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='refunded_at',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='total_amount_usd',
            field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12),
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='venue_name_snapshot',
            field=models.CharField(blank=True, max_length=255),
        ),
        migrations.AddField(
            model_name='hostbookingrequestaddon',
            name='pricing_type_snapshot',
            field=models.CharField(blank=True, max_length=50),
        ),
        migrations.AlterField(
            model_name='hostbookingrequest',
            name='guest_profile',
            field=models.ForeignKey(blank=True, help_text='Used when the booking is made by a Live in Sri Lanka Guest / Foreigner.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hosting_booking_requests', to='expat_life.foreignerprofile'),
        ),
        migrations.AlterField(
            model_name='hostbookingrequest',
            name='status',
            field=models.CharField(choices=[('submitted', 'Submitted'), ('under_review', 'Under Review'), ('waiting_host_confirmation', 'Waiting for Host Confirmation'), ('quotation_ready', 'Quotation Ready'), ('guest_confirmed', 'Guest Confirmed'), ('payment_due', 'Payment Due'), ('paid', 'Paid'), ('arranging', 'Arranging'), ('completed', 'Completed'), ('cancelled', 'Cancelled'), ('rejected', 'Rejected')], default='payment_due', max_length=40),
        ),
        migrations.AlterField(
            model_name='hostbookingrequestaddon',
            name='add_on_service',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='booking_add_on_items', to='hosting_app.hostaddonservice'),
        ),
        migrations.CreateModel(
            name='HostingClientProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client_type', models.CharField(choices=[('foreigner', 'Foreigner / Guest'), ('hosting_client', 'Hosting Client'), ('dating_partner', 'Dating Partner'), ('rental_owner', 'Rental Owner'), ('service_partner', 'Service Partner'), ('property_care_owner', 'Property Care Owner'), ('affiliate', 'Affiliate Partner'), ('other', 'Other')], default='hosting_client', max_length=40)),
                ('full_name', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(max_length=50)),
                ('whatsapp_number', models.CharField(blank=True, max_length=50)),
                ('country', models.CharField(blank=True, default='Sri Lanka', max_length=120)),
                ('city', models.CharField(blank=True, max_length=120)),
                ('created_from_existing_profile', models.BooleanField(default=False)),
                ('source_profile_type', models.CharField(blank=True, choices=[('foreigner', 'Foreigner / Guest'), ('hosting_client', 'Hosting Client'), ('dating_partner', 'Dating Partner'), ('rental_owner', 'Rental Owner'), ('service_partner', 'Service Partner'), ('property_care_owner', 'Property Care Owner'), ('affiliate', 'Affiliate Partner'), ('other', 'Other')], help_text='Example: foreigner, dating_partner, rental_owner, service_partner, property_care_owner, affiliate.', max_length=60)),
                ('source_profile_id', models.PositiveIntegerField(blank=True, help_text='Optional source profile ID if this hosting client was created from another profile.', null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('admin_note', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='hosting_client_profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Hosting Client Profile',
                'verbose_name_plural': 'Hosting Client Profiles',
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='hostbookingrequest',
            name='hosting_client_profile',
            field=models.ForeignKey(blank=True, help_text='Used when the booking is made by a local/direct hosting client.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hosting_booking_requests', to='hosting_app.hostingclientprofile'),
        ),
        migrations.AddIndex(
            model_name='hostbookingrequest',
            index=models.Index(fields=['booked_by_user', 'payment_status'], name='hosting_app_booked__9c5927_idx'),
        ),
        migrations.AddIndex(
            model_name='hostbookingrequest',
            index=models.Index(fields=['host_profile', 'payment_status'], name='hosting_app_host_pr_957fdc_idx'),
        ),
        migrations.AddIndex(
            model_name='hostbookingrequest',
            index=models.Index(fields=['venue', 'payment_status'], name='hosting_app_venue_i_6ccbf1_idx'),
        ),
        migrations.AddIndex(
            model_name='hostbookingrequest',
            index=models.Index(fields=['status'], name='hosting_app_status_7398a8_idx'),
        ),
    ]
