# Generated by Django 3.1.3 on 2020-12-07 19:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('pid', models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, related_name='parent', to='flat.city')),
            ],
            options={
                'verbose_name': 'Тип Город (для выборки)',
                'verbose_name_plural': 'Тип Города (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип Страна',
                'verbose_name_plural': 'Тип Страны',
            },
        ),
        migrations.CreateModel(
            name='Flat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('isnew', models.BooleanField(verbose_name='Новостройка')),
                ('floor', models.IntegerField(verbose_name='Этаж')),
                ('floortotal', models.IntegerField(null=True, verbose_name='Количество этажей в доме')),
                ('sqkitchen', models.IntegerField(null=True, verbose_name='Площадь кухни')),
                ('sqtotal', models.IntegerField(verbose_name='Общая площадь')),
                ('sqtotaldesc', models.IntegerField(verbose_name='Площадь с расшифровкой')),
                ('height', models.IntegerField(null=True, verbose_name='Высота потолков')),
                ('wctype', models.CharField(max_length=100, null=True, verbose_name='Тип санузла')),
                ('year', models.IntegerField(null=True, verbose_name='Год постройки')),
                ('housetudestrou', models.BooleanField(verbose_name='Дом под снос')),
                ('isapartaments', models.BooleanField(null=True, verbose_name='Апартаменты')),
                ('createdat', models.DateTimeField(verbose_name='дата регистрации')),
                ('phone', models.CharField(max_length=100, verbose_name='Телефон клиента')),
                ('text', models.TextField(verbose_name='Текст объявления')),
                ('price', models.IntegerField(verbose_name='Цена')),
                ('address', models.CharField(max_length=200, verbose_name='адрес')),
                ('coord_lat', models.CharField(max_length=100, verbose_name='широта')),
                ('coord_long', models.CharField(max_length=100, verbose_name='долгота')),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.city', verbose_name='Город')),
            ],
            options={
                'verbose_name': 'Квартира',
                'verbose_name_plural': 'Квартиры',
                'ordering': ['-createdat'],
            },
        ),
        migrations.CreateModel(
            name='Freeplan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип Планировка (для выборки)',
                'verbose_name_plural': 'Тип Планировки (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Housetype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип дома (для выборки)',
                'verbose_name_plural': 'Тип дома (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Lifttype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип лифта (для выборки)',
                'verbose_name_plural': 'Тип лифта (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Mertoline',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.city')),
            ],
            options={
                'verbose_name': 'Тип линия метро (для выборки)',
                'verbose_name_plural': 'Тип линия метро (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Parkingtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип парковка(для выборки)',
                'verbose_name_plural': 'Тип парковка(для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Repairtype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип Ремонт (для выборки)',
                'verbose_name_plural': 'Тип Ремонт (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Roomtypes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип Количество комнат в квартире (для выборки)',
                'verbose_name_plural': 'Тип Количество комнат в квартире (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Saletype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип продажи(для выборки)',
                'verbose_name_plural': 'Тип продажи(для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Sallertype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип продавца(для выборки)',
                'verbose_name_plural': 'Тип продавца(для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Windowsview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Тип Вид из окна (для выборки)',
                'verbose_name_plural': 'Тип Вид из окна (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.country')),
                ('pid', models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, related_name='parent', to='flat.region')),
            ],
            options={
                'verbose_name': 'Тип Регион (для выборки)',
                'verbose_name_plural': 'Тип Регионы (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Metro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('metroline', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.mertoline')),
            ],
            options={
                'verbose_name': 'Тип метро (для выборки)',
                'verbose_name_plural': 'Тип метро (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Flatmetro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('flat', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.flat')),
                ('metro', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.metro')),
            ],
            options={
                'verbose_name': 'Тип метро-квартиры (для выборки)',
                'verbose_name_plural': 'Тип метро-квартиры (для выборки)',
            },
        ),
        migrations.CreateModel(
            name='Flatimges',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pik', models.FileField(upload_to=flat.models.flat_upload_path)),
                ('flat', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.flat')),
            ],
            options={
                'verbose_name': 'Тип фото (для выборки)',
                'verbose_name_plural': 'Тип фото (для выборки)',
            },
        ),
        migrations.AddField(
            model_name='flat',
            name='freeplan',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.freeplan', verbose_name='Планировка'),
        ),
        migrations.AddField(
            model_name='flat',
            name='housetype',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.housetype', verbose_name='Тип дома'),
        ),
        migrations.AddField(
            model_name='flat',
            name='lifttype',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.lifttype', verbose_name='Тип лифта'),
        ),
        migrations.AddField(
            model_name='flat',
            name='parkingtype',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.parkingtype', verbose_name='Паркинг'),
        ),
        migrations.AddField(
            model_name='flat',
            name='repairtype',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.repairtype', verbose_name='Ремонт'),
        ),
        migrations.AddField(
            model_name='flat',
            name='roomtype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.roomtypes', verbose_name='Сколько комнат'),
        ),
        migrations.AddField(
            model_name='flat',
            name='saletype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.saletype', verbose_name='Тип продаж'),
        ),
        migrations.AddField(
            model_name='flat',
            name='sallertype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.sallertype', verbose_name='Тип продавца'),
        ),
        migrations.AddField(
            model_name='flat',
            name='windowsview',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, to='flat.windowsview', verbose_name='Вид из окна'),
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.city')),
            ],
            options={
                'verbose_name': 'Тип Район города (для выборки)',
                'verbose_name_plural': 'Тип Районы города (для выборки)',
            },
        ),
        migrations.AddField(
            model_name='city',
            name='region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='flat.region'),
        ),
    ]
