# Generated by Django 5.2.11 on 2026-04-06 14:21

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('expat_life', '0004_foreignerprofile'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='RentalListing',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('slug', models.SlugField(unique=True)),
                ('property_type', models.CharField(choices=[('room', 'Room'), ('annex', 'Annex'), ('apartment', 'Apartment'), ('house', 'House'), ('villa', 'Villa'), ('guesthouse', 'Guesthouse'), ('other', 'Other')], max_length=30)),
                ('visibility', models.CharField(choices=[('public', 'Public'), ('private', 'Private for Confirmed Foreigners')], default='public', max_length=20)),
                ('city', models.CharField(max_length=120)),
                ('area', models.CharField(blank=True, max_length=120)),
                ('address', models.TextField(blank=True)),
                ('monthly_rent_usd', models.DecimalField(decimal_places=2, max_digits=10)),
                ('security_deposit_usd', models.DecimalField(decimal_places=2, default=0.0, max_digits=10)),
                ('bedrooms', models.PositiveIntegerField(default=1)),
                ('bathrooms', models.PositiveIntegerField(default=1)),
                ('max_occupants', models.PositiveIntegerField(default=1)),
                ('furnishing', models.CharField(choices=[('fully_furnished', 'Fully Furnished'), ('semi_furnished', 'Semi Furnished'), ('unfurnished', 'Unfurnished')], default='fully_furnished', max_length=30)),
                ('has_wifi', models.BooleanField(default=False)),
                ('has_ac', models.BooleanField(default=False)),
                ('has_kitchen', models.BooleanField(default=False)),
                ('has_parking', models.BooleanField(default=False)),
                ('near_beach', models.BooleanField(default=False)),
                ('suitable_for_remote_work', models.BooleanField(default=False)),
                ('short_description', models.CharField(max_length=255)),
                ('full_description', models.TextField()),
                ('house_rules', models.TextField(blank=True)),
                ('available_from', models.DateField(blank=True, null=True)),
                ('is_available', models.BooleanField(default=True)),
                ('is_approved', models.BooleanField(default=False)),
                ('is_featured', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Rental Listing',
                'verbose_name_plural': 'Rental Listings',
                'ordering': ['-is_featured', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='RentalInquiry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=150)),
                ('email', models.EmailField(max_length=254)),
                ('whatsapp_number', models.CharField(blank=True, max_length=50)),
                ('message', models.TextField(blank=True)),
                ('is_reviewed', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('foreigner_profile', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rental_inquiries', to='expat_life.foreignerprofile')),
                ('listing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inquiries', to='rental_app.rentallisting')),
            ],
            options={
                'verbose_name': 'Rental Inquiry',
                'verbose_name_plural': 'Rental Inquiries',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='RentalListingImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='rental_listings/')),
                ('caption', models.CharField(blank=True, max_length=150)),
                ('order', models.PositiveIntegerField(default=0)),
                ('listing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='rental_app.rentallisting')),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='RentalOwner',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('owner_type', models.CharField(choices=[('individual', 'Individual'), ('agency', 'Agency'), ('company', 'Company')], default='individual', max_length=20)),
                ('full_name', models.CharField(max_length=150)),
                ('email', models.EmailField(max_length=254)),
                ('whatsapp_number', models.CharField(blank=True, max_length=50)),
                ('phone_number', models.CharField(blank=True, max_length=50)),
                ('city', models.CharField(max_length=120)),
                ('address', models.TextField(blank=True)),
                ('business_name', models.CharField(blank=True, max_length=150)),
                ('is_identity_verified', models.BooleanField(default=False)),
                ('is_approved', models.BooleanField(default=False)),
                ('can_submit_listings', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rental_owner_profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Rental Owner',
                'verbose_name_plural': 'Rental Owners',
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='rentallisting',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='listings', to='rental_app.rentalowner'),
        ),
    ]
