# Generated by Django 3.1.4 on 2021-02-05 15:51

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='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, null=True, verbose_name='Имя')),
                ('last_name', models.CharField(max_length=100, null=True, verbose_name='Фамилия')),
                ('middle_name', models.CharField(max_length=100, null=True, verbose_name='Отчество')),
                ('phone', models.CharField(max_length=100, null=True, verbose_name='Телефон')),
                ('email', models.CharField(max_length=100, null=True, verbose_name='Email')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Кто добавил')),
            ],
        ),
        migrations.CreateModel(
            name='Realtor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, null=True, verbose_name='Имя')),
                ('last_name', models.CharField(max_length=100, null=True, verbose_name='Фамилия')),
                ('middle_name', models.CharField(max_length=100, null=True, verbose_name='Отчество')),
                ('commission', models.IntegerField(null=True, verbose_name='Комиссия')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Кто добавил')),
            ],
        ),
        migrations.CreateModel(
            name='Req',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('property_type', models.CharField(choices=[('Дом', 'Дом'), ('Квартира', 'Квартира'), ('Земля', 'Земля')], max_length=100, verbose_name='Тип имущества')),
                ('min_price', models.IntegerField(null=True, verbose_name='Цена от')),
                ('max_price', models.IntegerField(null=True, verbose_name='До')),
                ('min_area', models.IntegerField(null=True, verbose_name='Минимальная площадь (кв. метров)')),
                ('max_area', models.IntegerField(null=True, verbose_name='Максимальная площадь (кв. метров)')),
                ('min_room_count', models.IntegerField(null=True, verbose_name='Минимальное количество комнат')),
                ('max_room_count', models.IntegerField(null=True, verbose_name='Максимальное количество комнат')),
                ('min_floor', models.IntegerField(null=True, verbose_name='Этаж от')),
                ('max_floor', models.IntegerField(null=True, verbose_name='До')),
                ('min_floor_count', models.IntegerField(null=True, verbose_name='Количество этажей от')),
                ('max_floor_count', models.IntegerField(null=True, verbose_name='До')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Автор обьявления')),
                ('client', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.client', verbose_name='Номер клиента')),
                ('realtor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.realtor', verbose_name='Номер риэлтора')),
            ],
        ),
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', models.CharField(blank=True, max_length=15, null=True, verbose_name='Город')),
                ('street', models.CharField(blank=True, max_length=15, null=True, verbose_name='Улица')),
                ('number_home', models.IntegerField(blank=True, null=True, verbose_name='Дом')),
                ('number_flat', models.IntegerField(blank=True, null=True, verbose_name='Квартира')),
                ('floor', models.IntegerField(blank=True, null=True, verbose_name='Этаж')),
                ('rooms', models.IntegerField(blank=True, null=True, verbose_name='Количество комнат')),
                ('area', models.IntegerField(verbose_name='Площадь')),
                ('floor_count', models.IntegerField(blank=True, null=True, verbose_name='Количество этажей')),
                ('property_type', models.CharField(choices=[('Дом', 'Дом'), ('Квартира', 'Квартира'), ('Земля', 'Земля')], max_length=20, null=True, verbose_name='Тип собственности')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Кто добавил')),
            ],
            options={
                'verbose_name': 'запрос',
                'verbose_name_plural': 'запросы',
            },
        ),
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField(null=True, verbose_name='Цена')),
                ('price_percent', models.IntegerField(blank=True, null=True, verbose_name='Цена c процентами')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Автор обьявления')),
                ('client', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.client', verbose_name='Номер клиента')),
                ('property', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.property', verbose_name='Номер недвижимости')),
                ('realtor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.realtor', verbose_name='Номер риэлтора')),
            ],
            options={
                'verbose_name': 'предложение',
                'verbose_name_plural': 'Предложения',
            },
        ),
        migrations.CreateModel(
            name='Deal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Автор сделки')),
                ('offer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.offer', verbose_name='Номер предложения')),
                ('req', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='stormwind_app.req', verbose_name='Номер запроса')),
            ],
        ),
    ]
