# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-11-16 12:21
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('pcart_catalog', '0074_auto_20171030_1946'),
        ('pcart_import', '0009_ymlimportprofile'),
    ]

    operations = [
        migrations.CreateModel(
            name='YMLImportCategory',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255, unique=True, verbose_name='Title')),
                ('product_type_function', models.TextField(blank=True, default='', help_text='Use P-Cart Script for implementing complex logic.', verbose_name='Product type function')),
                ('collection_function', models.TextField(blank=True, default='', help_text='Use P-Cart Script for implementing complex logic.', verbose_name='Collection function')),
                ('default_collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pcart_catalog.Collection', verbose_name='Default collection')),
                ('default_product_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pcart_catalog.ProductType', verbose_name='Default product type')),
            ],
            options={
                'verbose_name_plural': 'Категорії імпорту YML',
                'verbose_name': 'Категорія імпорту YML',
                'ordering': ['title'],
            },
        ),
        migrations.AddField(
            model_name='ymlimportprofile',
            name='active',
            field=models.BooleanField(default=True, verbose_name='Active'),
        ),
        migrations.AddField(
            model_name='ymlimportcategory',
            name='profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='import_categories', to='pcart_import.YMLImportProfile', verbose_name='Import profile'),
        ),
    ]
