# Generated by Django 2.2 on 2021-03-29 07:58

import ckeditor_uploader.fields
import core.utils
from django.db import migrations, models
import django.db.models.deletion
import django_2gis_maps.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=255, null=True, verbose_name='Название')),
                ('logo', models.ImageField(blank=True, null=True, upload_to=core.utils.generate_filename, verbose_name='Лого')),
                ('description', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='Описание')),
                ('address', models.CharField(blank=True, max_length=50, null=True, verbose_name='Адрес')),
                ('link', models.URLField(blank=True, null=True, verbose_name='Ссылка')),
            ],
            options={
                'verbose_name': 'Бренд',
                'verbose_name_plural': 'Бренды',
            },
        ),
        migrations.CreateModel(
            name='Filial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Название')),
                ('address', django_2gis_maps.fields.AddressField(max_length=200, verbose_name='Адрес')),
                ('geolocation', django_2gis_maps.fields.GeoLocationField()),
                ('start_work', models.TimeField(auto_now_add=True, verbose_name='Начало рабочего времени')),
                ('end_work', models.TimeField(auto_now_add=True, verbose_name='Конец рабочего времени')),
                ('is_around_the_clock', models.BooleanField(default=False, verbose_name='Круглосуточно?')),
                ('description', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='Описание')),
                ('link', models.URLField(blank=True, null=True, verbose_name='Ссылка')),
            ],
            options={
                'verbose_name': 'Филиал',
                'verbose_name_plural': 'Филиалы',
            },
        ),
        migrations.CreateModel(
            name='FilialPhone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=255, verbose_name='Номер телефона')),
                ('is_phone', models.BooleanField(default=True, verbose_name='Номер телефона?')),
                ('is_whatsapp', models.BooleanField(default=True, verbose_name='Номер Whatsapp')),
                ('filial', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='phone_numbers', to='brand.Filial', verbose_name='Филиал')),
            ],
            options={
                'verbose_name': 'Номер филиала',
                'verbose_name_plural': 'Номера филиала',
            },
        ),
        migrations.CreateModel(
            name='FilialImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to=core.utils.generate_filename, verbose_name='Изображение')),
                ('is_main', models.BooleanField(default=False, verbose_name='Основная')),
                ('filial', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='brand.Filial', verbose_name='Филиал')),
            ],
            options={
                'verbose_name': 'Изображение филиала',
                'verbose_name_plural': 'Изображения филиала',
            },
        ),
        migrations.CreateModel(
            name='BrandImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to=core.utils.generate_filename, verbose_name='Изображение')),
                ('is_main', models.BooleanField(default=False, verbose_name='Основная')),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='brand.Brand', verbose_name='Бренд')),
            ],
            options={
                'verbose_name': 'Изображение бренда',
                'verbose_name_plural': 'Изображения бренда',
            },
        ),
    ]
