# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-08 09:46
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('pcart_catalog', '0005_auto_20170220_2047'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProductImageDownloadLink',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('url', models.TextField(verbose_name='URL')),
                ('added', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
                ('image', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='download_link', to='pcart_catalog.ProductImage', verbose_name='Image')),
            ],
            options={
                'verbose_name_plural': 'Product image download links',
                'verbose_name': 'Product image download link',
            },
        ),
        migrations.CreateModel(
            name='ProductImportLogMessage',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('message', models.TextField(blank=True, default='', verbose_name='Message')),
                ('added', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
            ],
            options={
                'verbose_name_plural': 'Product import log messages',
                'verbose_name': 'Product import log message',
            },
        ),
        migrations.CreateModel(
            name='ProductTypeRelation',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('alternate_uuid', models.UUIDField(help_text='UUID of the product category in 1C system.', verbose_name='UUID in 1C')),
                ('collections', models.ManyToManyField(blank=True, help_text='Add the products of specified type to a collection.', related_name='product_type_relations', to='pcart_catalog.Collection', verbose_name='Collections')),
                ('product_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_type_relations', to='pcart_catalog.ProductType', verbose_name='ProductType')),
            ],
            options={
                'verbose_name_plural': 'Product type relations',
                'verbose_name': 'Product type relation',
            },
        ),
        migrations.CreateModel(
            name='XMLFile',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('filename', models.CharField(max_length=255, verbose_name='File name')),
                ('added', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
            ],
            options={
                'verbose_name_plural': 'XML import files',
                'verbose_name': 'XML import file',
            },
        ),
        migrations.AddField(
            model_name='productimportlogmessage',
            name='file',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='import_log_messages', to='soap_1c_api.XMLFile', verbose_name='XML import file'),
        ),
        migrations.AddField(
            model_name='productimportlogmessage',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='import_log_messages', to='pcart_catalog.Product', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='productimportlogmessage',
            name='variant',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='import_log_messages', to='pcart_catalog.ProductVariant', verbose_name='Product variant'),
        ),
    ]
