# Generated by Django 2.1.5 on 2019-03-30 12:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('authentication', '0001_initial'),
        ('apartments', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApartmentReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.IntegerField(default=-1)),
                ('has_reviewed', models.BooleanField(default=False)),
                ('apartment_to_be_reviewed', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='apartment', to='apartments.Apartment')),
                ('user_to_review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subtenant_to_review', to='authentication.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='CompleteReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_finished', models.BooleanField(default=False)),
                ('apartment_review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='apartment_review', to='review.ApartmentReview')),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contract', to='apartments.Contract')),
            ],
        ),
        migrations.CreateModel(
            name='UserReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.IntegerField(default=-1)),
                ('has_reviewed', models.BooleanField(default=False)),
                ('user_to_be_reviewed', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviewed', to='authentication.Profile')),
                ('user_to_review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviewer', to='authentication.Profile')),
            ],
        ),
        migrations.AddField(
            model_name='completereview',
            name='review_of_subtenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subtenant_review', to='review.UserReview'),
        ),
        migrations.AddField(
            model_name='completereview',
            name='review_of_tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tenant_review', to='review.UserReview'),
        ),
    ]
