# Generated by Django 3.2.4 on 2021-06-12 08:27

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('shop', '0001_initial'),
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bengali_name', models.CharField(max_length=150)),
                ('english_name', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bengali_name', models.CharField(max_length=64)),
                ('english_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bengali_name', models.CharField(max_length=150)),
                ('english_name', models.CharField(max_length=150)),
                ('code', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.TextField(blank=True, max_length=2000, null=True)),
                ('stock', models.IntegerField(default=0)),
                ('total_sale', models.IntegerField(default=0)),
                ('purchase_price', models.IntegerField(blank=True, default=0)),
                ('sale_price', models.IntegerField(default=0)),
                ('discount', models.IntegerField(blank=True, default=0)),
                ('sizes', models.CharField(blank=True, choices=[('zero', 'ZERO'), ('xs', 'XS'), ('s', 'S'), ('m', 'M'), ('l', 'L'), ('xl', 'XL'), ('xxl', 'XXL')], max_length=50, null=True)),
                ('notes', models.TextField(blank=True, max_length=2000, null=True)),
                ('status', models.CharField(choices=[('1', 'Yes'), ('0', 'No')], default='1', max_length=1)),
                ('rating', models.IntegerField(blank=True, default=0, editable=False)),
                ('total_visited', models.IntegerField(blank=True, default=0, editable=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(blank=True, default=False)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.category', verbose_name='product category')),
                ('color', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='home.color', verbose_name='product color')),
                ('created_by', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='account.user', verbose_name='product create by')),
                ('shop_by', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='shop.shop', verbose_name='product shop by')),
            ],
        ),
        migrations.CreateModel(
            name='ProductReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('details', models.TextField(max_length=2000)),
                ('star', models.SmallIntegerField(choices=[(5, '5 Star'), (4, '4 Star'), (3, '3 Star'), (2, '2 Star'), (1, '1 Star')], default=5)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
                ('product_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.product', verbose_name='product name')),
                ('review_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='account.user', verbose_name='reviewer name')),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bengali_name', models.CharField(max_length=150)),
                ('english_name', models.CharField(max_length=150)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.category', verbose_name='category')),
            ],
        ),
        migrations.CreateModel(
            name='SubSubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bengali_name', models.CharField(max_length=150)),
                ('english_name', models.CharField(max_length=150)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.category', verbose_name='category')),
                ('sub_category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.subcategory', verbose_name='sub category')),
            ],
        ),
        migrations.CreateModel(
            name='ProductReviewComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('details', models.TextField(max_length=2000)),
                ('star', models.SmallIntegerField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
                ('commented_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='account.user', verbose_name='commenter name')),
                ('review_title', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.productreview', verbose_name='review title')),
            ],
        ),
        migrations.CreateModel(
            name='ProductPic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pic_name', models.ImageField(upload_to=home.models.product_data_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('product_id', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='home.product', verbose_name='product id')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='sub_category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='home.subcategory', verbose_name='sub category'),
        ),
        migrations.AddField(
            model_name='product',
            name='sub_sub_category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='home.subsubcategory', verbose_name='sub sub category'),
        ),
    ]
