# Generated by Django 3.1.2 on 2020-11-17 05:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='Название')),
                ('price', models.IntegerField(verbose_name='Цена')),
                ('description', models.TextField(verbose_name='Описание')),
            ],
        ),
        migrations.CreateModel(
            name='Markers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=40, verbose_name='Название метки')),
                ('location', models.CharField(max_length=250, verbose_name='Координаты')),
                ('description', models.TextField(verbose_name='Описание метки')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('price', models.ManyToManyField(related_name='marker_price', to='maintable.Price', verbose_name='Цены')),
            ],
            options={
                'verbose_name': 'Метка',
                'verbose_name_plural': 'Метки',
                'ordering': ['-date'],
            },
        ),
        migrations.CreateModel(
            name='ImagesForMarkers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('images', models.ImageField(upload_to='media/imagesformarkers/', verbose_name='Изображение')),
                ('marker', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='maintable.markers', verbose_name='Метка')),
            ],
            options={
                'verbose_name': 'Изображение',
                'verbose_name_plural': 'Изображения',
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='maintable.markers', verbose_name='Город')),
            ],
        ),
    ]
