# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-05 20:36
from __future__ import unicode_literals

import catalog.models
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import mptt.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=200, verbose_name='Category')),
                ('image', models.ImageField(blank=True, null=True, upload_to=catalog.models.set_image_name, verbose_name='Изображение')),
                ('meta_description', models.CharField(blank=True, max_length=200, null=True, verbose_name='META Description')),
                ('meta_keywords', models.CharField(blank=True, max_length=200, null=True, verbose_name='META Keywords')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Description')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='catalog.Category', verbose_name='Parent category')),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
            managers=[
                ('_tree_manager', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=250, verbose_name='Product')),
                ('image', models.ImageField(blank=True, null=True, upload_to=catalog.models.set_product_image_name, verbose_name='Изображение')),
                ('text', models.TextField(blank=True, null=True, verbose_name='Текст')),
                ('meta_description', models.CharField(blank=True, max_length=200, null=True, verbose_name='META Description')),
                ('meta_keywords', models.CharField(blank=True, max_length=200, null=True, verbose_name='META Keywords')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Description')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Category', verbose_name='Category')),
            ],
            options={
                'verbose_name': 'Product',
                'verbose_name_plural': 'Products',
            },
        ),
    ]
