# Generated by Django 3.2.6 on 2021-09-10 14:35

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


class Migration(migrations.Migration):

    dependencies = [
        ('content', '0005_auto_20210828_1748'),
    ]

    operations = [
        migrations.CreateModel(
            name='Brands',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True, verbose_name='نام نوع دسته بندی')),
            ],
            options={
                'verbose_name': 'برند',
                'verbose_name_plural': 'برند ها',
            },
        ),
        migrations.RenameField(
            model_name='category',
            old_name='main_category',
            new_name='parent',
        ),
        migrations.RemoveField(
            model_name='category',
            name='type',
        ),
        migrations.RemoveField(
            model_name='products',
            name='category',
        ),
        migrations.AddField(
            model_name='products',
            name='category',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='content.category', verbose_name='دسته بندی مربوطه'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='products',
            name='off_price',
            field=models.PositiveIntegerField(blank=True, default=0, null=True, verbose_name='قیمت با تخفیف'),
        ),
        migrations.AlterField(
            model_name='products',
            name='product_price',
            field=models.PositiveIntegerField(default=0, verbose_name='قیمت محصول'),
        ),
        migrations.DeleteModel(
            name='CategoryType',
        ),
        migrations.AddField(
            model_name='products',
            name='brand',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='content.brands', verbose_name='نام برند'),
            preserve_default=False,
        ),
    ]
