# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-01 13:39
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Availability',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('availability_title', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Offers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('offer_title', models.CharField(max_length=250, verbose_name='Название')),
                ('offer_price', models.FloatField(default=0, verbose_name='Цена')),
                ('offer_valuta', models.CharField(max_length=40, verbose_name='Валюта')),
                ('offer_value', models.CharField(blank=True, max_length=50, verbose_name='Единица измерения')),
                ('offer_minorder', models.IntegerField(default=1, verbose_name='Минимальный размер заказа')),
                ('offer_minorder_value', models.CharField(blank=True, max_length=50, verbose_name='Единица измерения минимального заказа')),
                ('offer_pre_text', models.TextField(blank=True, default=None, null=True, verbose_name='Краткое описание')),
                ('offer_text', models.TextField(default=None, verbose_name='Полное описание')),
                ('offer_photo', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Фото на страницу')),
                ('offer_url', models.CharField(max_length=250, verbose_name='Ссылка на товар на нашем сайте')),
                ('offer_image_url', models.URLField(blank=True, default=None, null=True, verbose_name='Ссылка на картинку')),
                ('offer_availability', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='import.Availability', verbose_name='Наличие')),
            ],
            options={
                'verbose_name': 'Товар',
                'verbose_name_plural': 'Товары',
            },
        ),
        migrations.CreateModel(
            name='Publish',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publish_title', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Subtags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag_url', models.CharField(max_length=250, unique=True)),
                ('tag_title', models.CharField(default=None, max_length=250)),
            ],
            options={
                'verbose_name': 'Дополнительные теги',
                'verbose_name_plural': 'Дополнительные теги',
            },
        ),
        migrations.CreateModel(
            name='Tags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag_url', models.CharField(max_length=250, unique=True)),
                ('tag_title', models.CharField(max_length=250)),
                ('tag_publish', models.BooleanField()),
                ('tag_priority', models.IntegerField(blank=True)),
            ],
            options={
                'verbose_name': 'Основные теги',
                'verbose_name_plural': 'Основные теги',
            },
        ),
        migrations.AddField(
            model_name='subtags',
            name='tag_parent_tag',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='import.Tags'),
        ),
        migrations.AddField(
            model_name='offers',
            name='offer_publish',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='import.Publish', verbose_name='Публикуемость'),
        ),
        migrations.AddField(
            model_name='offers',
            name='offer_subtags',
            field=models.ManyToManyField(blank=True, to='import.Subtags', verbose_name='Группа 2 уровня'),
        ),
        migrations.AddField(
            model_name='offers',
            name='offer_tag',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='import.Tags', verbose_name='Группа 1 уровня'),
        ),
    ]
