# Generated by Django 2.2.5 on 2019-09-20 23:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0012_auto_20190918_2208'),
    ]

    operations = [
        migrations.CreateModel(
            name='BrandCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort', models.PositiveIntegerField(default=0, verbose_name='排序优先级')),
                ('is_enable', models.BooleanField(default=True, verbose_name='是否启用')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('add_time', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('extends', models.TextField(blank=True, default='', null=True, verbose_name='扩展数据(json格式存储)')),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='category_set', to='product.Brand', verbose_name='关联品牌')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='brand_set', to='product.Category', verbose_name='关联分类')),
            ],
            options={
                'verbose_name': '品牌分类关系',
                'verbose_name_plural': '品牌分类关系',
                'db_table': 't_brand_category',
                'ordering': ('-sort', '-add_time'),
            },
        ),
        migrations.AddField(
            model_name='product',
            name='category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='product.Category', verbose_name='分类'),
        ),
        migrations.DeleteModel(
            name='ProductCategory',
        ),
    ]
