# Generated by Django 3.0.4 on 2020-03-14 12:28

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='Board',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kod', models.CharField(blank=True, max_length=20, null=True)),
                ('url', models.CharField(blank=True, max_length=255, null=True)),
                ('address', models.CharField(blank=True, max_length=255, null=True)),
                ('light', models.BooleanField(blank=True, default=None, null=True)),
                ('ots', models.IntegerField(blank=True, null=True)),
                ('grp', models.FloatField(blank=True, null=True)),
                ('kod_doors', models.IntegerField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Площина',
                'verbose_name_plural': 'Площини',
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='BoardSize',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Розмір площини',
                'verbose_name_plural': 'Розміри площин',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Місто',
                'verbose_name_plural': 'Міста',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='CityArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Район міста',
                'verbose_name_plural': 'Райони міста',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='MediaType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Тип носія',
                'verbose_name_plural': 'Типи носіїв',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Month',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Місяць',
                'verbose_name_plural': 'Місяці',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Operator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('slug', models.SlugField(blank=True, max_length=40, null=True)),
            ],
            options={
                'verbose_name': 'Оператор',
                'verbose_name_plural': 'Оператори',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Область',
                'verbose_name_plural': 'Області',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Side',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Сторона',
                'verbose_name_plural': 'Сторони',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Статус',
                'verbose_name_plural': 'Статуси',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Year',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.SmallIntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Рік',
                'verbose_name_plural': 'Роки',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='StatusPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.FloatField(blank=True, null=True)),
                ('board', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='boards', to='parsing.Board')),
                ('month', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='months', to='parsing.Month')),
                ('status', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='statuses', to='parsing.Status')),
                ('year', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='years', to='parsing.Year')),
            ],
            options={
                'verbose_name': 'Статус, Прайс',
                'verbose_name_plural': 'Статуси, Прайси',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=255)),
                ('file', models.FileField(upload_to='workflow/%Y-%m-%d')),
                ('status', models.IntegerField(choices=[(1, 'Завантажений'), (2, 'Обробляється'), (3, 'Оброблений'), (4, 'Оброблений частково'), (5, 'Помилка')], default=1)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('operator', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='file_operator', to='parsing.Operator')),
                ('uploaded_by', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='uploaded_by', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Файл',
                'verbose_name_plural': 'Файли',
                'ordering': ['uploaded_at'],
            },
        ),
        migrations.AddField(
            model_name='board',
            name='city',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='cities', to='parsing.City'),
        ),
        migrations.AddField(
            model_name='board',
            name='city_area',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='city_areas', to='parsing.CityArea'),
        ),
        migrations.AddField(
            model_name='board',
            name='media_type',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='media_types', to='parsing.MediaType'),
        ),
        migrations.AddField(
            model_name='board',
            name='operator',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='regions', to='parsing.Operator'),
        ),
        migrations.AddField(
            model_name='board',
            name='region',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='regions', to='parsing.Region'),
        ),
        migrations.AddField(
            model_name='board',
            name='side',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='sides', to='parsing.Side'),
        ),
        migrations.AddField(
            model_name='board',
            name='size',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='sizes', to='parsing.BoardSize'),
        ),
    ]
