# Generated by Django 3.1.2 on 2021-06-15 22:14

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='Inquilino',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grupo', models.CharField(blank=True, default='inquilino', max_length=255, null=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('email', models.CharField(blank=True, max_length=255, null=True)),
                ('idade', models.PositiveIntegerField(blank=True, null=True)),
                ('genero', models.CharField(blank=True, choices=[('Masculino', 'Masculino'), ('Feminino', 'Feminino')], max_length=255, null=True)),
                ('profile_pic', models.ImageField(blank=True, default='profile1.png', null=True, upload_to='')),
                ('data_created', models.DateTimeField(auto_now_add=True, null=True)),
                ('bio', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Propriedade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('disponivel', models.BooleanField(default=True)),
                ('titulo', models.CharField(blank=True, max_length=255, null=True)),
                ('data_created', models.DateTimeField(auto_now_add=True)),
                ('preco', models.DecimalField(decimal_places=0, max_digits=65, null=True)),
                ('preco_semestral', models.DecimalField(blank=True, decimal_places=0, max_digits=65, null=True)),
                ('preco_anual', models.DecimalField(blank=True, decimal_places=0, max_digits=65, null=True)),
                ('local', models.TextField(blank=True, null=True)),
                ('numero_quartos', models.PositiveIntegerField(blank=True, null=True)),
                ('numero_inquilinos', models.PositiveIntegerField(blank=True, default=0, null=True)),
                ('area', models.CharField(blank=True, max_length=255, null=True)),
                ('orientacao_solar', models.CharField(blank=True, choices=[('Norte', 'Norte'), ('Sul', 'Sul'), ('Este', 'Este'), ('Oeste', 'Oeste')], max_length=255, null=True)),
                ('internet', models.BooleanField(null=True)),
                ('pets', models.BooleanField(null=True)),
                ('limpeza', models.BooleanField(null=True)),
                ('fumador', models.BooleanField(null=True)),
                ('faixa_etaria', models.CharField(blank=True, choices=[('18-24', '18-24'), ('25-29', '25-29'), ('30+', '30+'), ('Qualquer', 'Qualquer')], max_length=255, null=True)),
                ('genero', models.CharField(blank=True, choices=[('Masculino', 'Masculino'), ('Feminino', 'Feminino'), ('Qualquer', 'Qualquer')], max_length=255, null=True)),
                ('profile_pic', models.ImageField(blank=True, default='prop1.jpg', null=True, upload_to='')),
                ('Bio', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Senhorio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grupo', models.CharField(blank=True, default='senhorio', max_length=255, null=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('idade', models.PositiveIntegerField(blank=True, null=True)),
                ('email', models.CharField(blank=True, max_length=255, null=True)),
                ('profile_pic', models.ImageField(blank=True, default='profile1.png', null=True, upload_to='')),
                ('data_created', models.DateTimeField(auto_now_add=True, null=True)),
                ('bio', models.TextField(blank=True, null=True)),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ReviewUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('rate', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('likes', models.PositiveIntegerField(default=0)),
                ('unlikes', models.PositiveIntegerField(default=0)),
                ('avaliadoI', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.inquilino')),
                ('avaliadoS', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.senhorio')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('rate', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('likes', models.PositiveIntegerField(default=0)),
                ('unlikes', models.PositiveIntegerField(default=0)),
                ('propriedade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.propriedade')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='propriedade',
            name='senhorio',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.senhorio'),
        ),
        migrations.CreateModel(
            name='Oferta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_created', models.DateTimeField(auto_now_add=True)),
                ('status', models.CharField(choices=[('Em espera', 'Em espera'), ('Rejeitada', 'Rejeitada'), ('Aceitada', 'Aceitada')], default='Em espera', max_length=255)),
                ('periodo', models.CharField(choices=[('Mensal', 'Mensal'), ('Semestral', 'Semestral'), ('Anual', 'Anual')], default='Mensal', max_length=255)),
                ('quantidade', models.PositiveIntegerField()),
                ('inquilino', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.inquilino')),
                ('propriedade', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.propriedade')),
                ('senhorio', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.senhorio')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField(blank=True, max_length=1000, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('is_read', models.BooleanField(default=False)),
                ('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_user', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_user', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='inquilino',
            name='propriedade',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.propriedade'),
        ),
        migrations.AddField(
            model_name='inquilino',
            name='user',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Contrato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_created', models.DateTimeField(auto_now_add=True)),
                ('duracao', models.DateTimeField(null=True)),
                ('periodo', models.CharField(choices=[('Mensal', 'Mensal'), ('Semestral', 'Semestral'), ('Anual', 'Anual')], max_length=255)),
                ('quantidade', models.PositiveIntegerField(null=True)),
                ('expirou', models.BooleanField(default=False)),
                ('inquilino', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.inquilino')),
                ('propriedade', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.propriedade')),
                ('senhorio', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.senhorio')),
            ],
        ),
    ]
