# Generated by Django 2.1.4 on 2018-12-19 20:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('images', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True)),
                ('short_text', models.CharField(blank=True, max_length=150, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True)),
                ('short_text', models.CharField(blank=True, max_length=150, null=True)),
                ('long_text', models.CharField(blank=True, max_length=350, null=True)),
                ('now_price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('old_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('currency', models.CharField(default='₽', max_length=50)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(default=True)),
                ('quantity', models.PositiveIntegerField()),
                ('category', models.ForeignKey(default=products.models.default_category, on_delete=django.db.models.deletion.CASCADE, to='products.Category')),
                ('image', models.ForeignKey(default=products.models.default_image, on_delete=django.db.models.deletion.PROTECT, to='images.Image')),
            ],
        ),
        migrations.CreateModel(
            name='ProductMarker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('corner', models.CharField(blank=True, max_length=45, null=True, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='product_marker',
            field=models.ForeignKey(default=products.models.default_product_marker, on_delete=django.db.models.deletion.PROTECT, to='products.ProductMarker'),
        ),
    ]
