# Generated by Django 3.2.3 on 2021-05-15 13:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='House',
            fields=[
                ('house_id', models.AutoField(primary_key=True, serialize=False)),
                ('city', models.CharField(max_length=100)),
                ('state', models.CharField(max_length=100)),
                ('address', models.TextField()),
                ('rent', models.IntegerField()),
                ('description', models.TextField(null=True)),
                ('vacant', models.BooleanField(default=True)),
                ('rented_id', models.IntegerField(default=-1)),
                ('owner_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Requests',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('house_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rent_app.house')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='HouseImages',
            fields=[
                ('image', models.ImageField(upload_to='house_images/')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('house_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rent_app.house')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('rating', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], max_length=20)),
                ('house_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rent_app.house')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('user_id', 'house_id')},
            },
        ),
    ]
