# Generated by Django 2.2.4 on 2019-08-31 16:29

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image
import parler.fields
import parler.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True, verbose_name='Слово для Сайту')),
            ],
            options={
                'verbose_name': 'Категорію',
                'verbose_name_plural': 'Категорії',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_publish', models.BooleanField(default=True, verbose_name='показувати на сайті')),
                ('is_menu', models.BooleanField(blank=True, default=True, verbose_name='Додати в панель меню?')),
                ('slug', models.SlugField(verbose_name='Ключове слово')),
            ],
            options={
                'verbose_name': 'Сторінку сайта',
                'verbose_name_plural': 'Сторінки сайта',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_publish', models.BooleanField(default=True, verbose_name='показувати на сайті')),
                ('price', models.DecimalField(decimal_places=2, max_digits=9, verbose_name='Ціна')),
                ('count', models.PositiveIntegerField(default=1, verbose_name='Кількість товару')),
                ('slug', models.SlugField(unique=True, verbose_name='Слово для Сайту')),
                ('status', models.CharField(choices=[('av', 'В наявності'), ('not_av', 'В наявності'), ('order', 'Підзамовлення')], default=('av', 'В наявності'), max_length=20, verbose_name='Варіанти')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('album_cover', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Фото обкладинку')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='svetlyachokshop.Category', verbose_name='Категорія')),
            ],
            options={
                'verbose_name': 'Продукт',
                'verbose_name_plural': 'Продукти',
                'ordering': ['-date'],
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name="ім'я")),
                ('email', models.EmailField(max_length=254, verbose_name='email')),
                ('question', models.TextField(verbose_name='питання')),
                ('date', models.DateTimeField(auto_now=True, verbose_name='Дата')),
            ],
            options={
                'verbose_name': 'Запитання',
                'verbose_name_plural': 'Запитання',
            },
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='image', to='svetlyachokshop.Product')),
            ],
            options={
                'verbose_name': 'фото',
                'verbose_name_plural': 'фото',
            },
        ),
        migrations.CreateModel(
            name='ProductTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=50, verbose_name='Заголовок')),
                ('description', models.TextField(verbose_name='Опис')),
                ('meta_description', models.TextField(blank=True, null=True, verbose_name='Мета опис')),
                ('meta_keywords', models.CharField(blank=True, max_length=255, null=True, verbose_name='Мета Ключові слова')),
                ('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translation', to='svetlyachokshop.Product')),
            ],
            options={
                'verbose_name': 'Продукт Translation',
                'db_table': 'svetlyachokshop_product_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
                'unique_together': {('language_code', 'master')},
            },
            bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='PageTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=100, verbose_name='Заголовок')),
                ('description', models.TextField(verbose_name='Опис')),
                ('meta_description', models.TextField(blank=True, null=True, verbose_name='Мета опис')),
                ('meta_keywords', models.CharField(blank=True, max_length=255, null=True, verbose_name='Мета Ключові слова')),
                ('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translation', to='svetlyachokshop.Page')),
            ],
            options={
                'verbose_name': 'Сторінку сайта Translation',
                'db_table': 'svetlyachokshop_page_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
                'unique_together': {('language_code', 'master')},
            },
            bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CategoryTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('name', models.CharField(max_length=50, verbose_name='Назва')),
                ('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translation', to='svetlyachokshop.Category')),
            ],
            options={
                'verbose_name': 'Категорію Translation',
                'db_table': 'svetlyachokshop_category_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
                'unique_together': {('language_code', 'master')},
            },
            bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
        ),
    ]
