# Generated by Django 3.1.3 on 2020-12-02 12:36

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


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')),
                ('title', models.CharField(max_length=200, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='category')),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='ParentCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='parent_category')),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, unique=True)),
                ('price', models.DecimalField(decimal_places=2, max_digits=20)),
                ('discount_price', models.DecimalField(decimal_places=2, max_digits=20)),
                ('label', models.CharField(blank=True, choices=[('Sale', 'Sale'), ('New Arrival', 'New Arrival'), ('Trending', 'Trending'), ('Top Selling', 'Top Selling'), ('Popular', 'Popular')], help_text='Item is of Sale, New Arrival etc or leave it blank for no label.                                         (Label will be displayed over a item.)', max_length=11, null=True)),
                ('slug', models.SlugField(unique=True)),
                ('short_description', models.TextField(blank=True, help_text='To describe product in short', null=True)),
                ('description', models.TextField(blank=True, help_text='Overview product', null=True)),
                ('image_main', models.ImageField(blank=True, null=True, upload_to='products')),
                ('image_2', models.ImageField(blank=True, null=True, upload_to='products')),
                ('image_3', models.ImageField(blank=True, null=True, upload_to='products')),
                ('image_4', models.ImageField(blank=True, null=True, upload_to='products')),
                ('image_5', models.ImageField(blank=True, null=True, upload_to='products')),
                ('is_active', models.BooleanField(default=True)),
                ('trending', models.BooleanField(default=False)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.category')),
            ],
            options={
                'db_table': 'products_product',
                'ordering': ['title'],
            },
        ),
        migrations.AddField(
            model_name='category',
            name='parent_category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.parentcategory'),
        ),
    ]
