# Generated by Django 3.2 on 2021-05-19 21:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cityName', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Apartment',
            fields=[
                ('owner', models.OneToOneField(
                    on_delete=django.db.models.deletion.CASCADE,
                    primary_key=True, serialize=False,
                    to='users.user'
                    )),
                ('date_posted', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
                ('address', models.TextField()),
                ('rent', models.IntegerField()),
                ('num_of_roomates', models.IntegerField()),
                ('num_of_rooms', models.IntegerField()),
                ('start_date', models.DateField()),
                ('about', models.TextField(blank=True)),
                ('is_relevant', models.BooleanField(blank=True, default=True)),
                ('image_url', models.TextField(blank=True)),
                ('city', models.ForeignKey(
                    on_delete=django.db.models.deletion.RESTRICT,
                    related_name='city_apartments',
                    to='apartments.city'
                    )),
            ],
        ),
    ]
