# Generated by Django 5.2.7 on 2026-02-27 16:24

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


class Migration(migrations.Migration):

    dependencies = [
        ('hotel', '0017_roomtype_demand_price_multiplier_and_more'),
        ('payments', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CommissionConfig',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('percentage', models.DecimalField(decimal_places=2, default=15.0, help_text='HotelFinder commission percentage', max_digits=5)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('hotel', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='commission_config', to='hotel.hotel')),
            ],
        ),
        migrations.CreateModel(
            name='Settlement',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_booking_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('commission_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('settlement_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('processed', 'Processed'), ('failed', 'Failed')], default='pending', max_length=20)),
                ('scheduled_for', models.DateField(help_text='Date when this settlement should be processed')),
                ('processed_at', models.DateTimeField(blank=True, null=True)),
                ('transaction_id', models.CharField(blank=True, max_length=100, null=True, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('booking', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='settlement', to='hotel.hotelbooking')),
                ('hotel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='settlements', to='hotel.hotel')),
            ],
        ),
    ]
