# Generated by Django 3.2 on 2023-08-01 13:54

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('service', '0022_lastmlcall'),
    ]

    operations = [
        migrations.CreateModel(
            name='OtherObjects',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wkt', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('param1', models.FloatField(blank=True, null=True)),
                ('param2', models.TextField(blank=True, null=True)),
                ('visible', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Прочий объект',
                'verbose_name_plural': 'Прочие объекты',
            },
        ),
        migrations.CreateModel(
            name='OtherObjectsCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='Название слоя')),
                ('image', models.ImageField(blank=True, default=None, null=True, upload_to='other_objects_category_images/', verbose_name='Картинка')),
                ('visible', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'категория прочих объектов',
                'verbose_name_plural': 'Категории прочих объектов',
            },
        ),
        migrations.CreateModel(
            name='OtherObjectsGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='Название группы')),
                ('image', models.ImageField(blank=True, null=True, upload_to='other_objects_group_images/', verbose_name='Картинка')),
                ('visible', models.BooleanField(default=True)),
                ('category', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='otherobjectsgroup', to='service.otherobjectscategory')),
            ],
            options={
                'verbose_name': 'группа прочих объектов',
                'verbose_name_plural': 'Группы прочих объектов',
            },
        ),
        migrations.CreateModel(
            name='PlacementPointPVZDistance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dist', models.FloatField(blank=True, default=None, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Post_and_pvz',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wkt', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('visible', models.BooleanField(default=True)),
                ('inlude_in_ml', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Постамат или ПВЗ',
                'verbose_name_plural': 'Постаматы и ПВЗ',
            },
        ),
        migrations.CreateModel(
            name='Post_and_pvzCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='Название слоя')),
                ('image', models.ImageField(blank=True, default=None, null=True, upload_to='post_and_pvz_category_images/', verbose_name='Картинка')),
                ('visible', models.BooleanField(default=True)),
                ('inlude_in_ml', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'категория постаматов и ПВЗ',
                'verbose_name_plural': 'Категории постаматов и ПВЗ',
            },
        ),
        migrations.CreateModel(
            name='Post_and_pvzGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='Название группы')),
                ('image', models.ImageField(blank=True, null=True, upload_to='post_and_pvz_group_images/', verbose_name='Картинка')),
                ('visible', models.BooleanField(default=True)),
                ('inlude_in_ml', models.BooleanField(default=True)),
                ('category', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='post_and_pvz_group', to='service.post_and_pvzcategory')),
            ],
            options={
                'verbose_name': 'группа постаматов и ПВЗ',
                'verbose_name_plural': 'Группы постаматов и ПВЗ',
            },
        ),
        migrations.CreateModel(
            name='TaskStatus',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.TextField(unique=True, verbose_name='Название задачи')),
                ('status', models.TextField(blank=True, null=True, verbose_name='Статус выполнения')),
            ],
            options={
                'verbose_name': 'Статус фоновых задач',
                'verbose_name_plural': 'Статус фоновых задач',
            },
        ),
        migrations.DeleteModel(
            name='Rivals',
        ),
        migrations.AlterModelOptions(
            name='ao',
            options={'verbose_name': 'АО', 'verbose_name_plural': 'АО'},
        ),
        migrations.AlterModelOptions(
            name='placementpoint',
            options={'verbose_name': 'Точка', 'verbose_name_plural': 'Точки'},
        ),
        migrations.AlterModelOptions(
            name='pointdist',
            options={'verbose_name_plural': 'Расстояния между точками'},
        ),
        migrations.AlterModelOptions(
            name='rayon',
            options={'verbose_name': 'Район', 'verbose_name_plural': 'Районы'},
        ),
        migrations.AddField(
            model_name='post_and_pvz',
            name='category',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='post_and_pvz', to='service.post_and_pvzcategory'),
        ),
        migrations.AddField(
            model_name='post_and_pvz',
            name='group',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='post_and_pvz', to='service.post_and_pvzgroup'),
        ),
        migrations.AddField(
            model_name='placementpointpvzdistance',
            name='placement_point',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='service.placementpoint'),
        ),
        migrations.AddField(
            model_name='placementpointpvzdistance',
            name='pvz_postamates_group',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='service.post_and_pvzgroup'),
        ),
        migrations.AddField(
            model_name='otherobjects',
            name='category',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='other_objects', to='service.otherobjectscategory'),
        ),
        migrations.AddField(
            model_name='otherobjects',
            name='group',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='other_objects', to='service.otherobjectsgroup'),
        ),
    ]
