# Generated by Django 2.2.5 on 2019-09-14 13:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('logistics', '0002_auto_20190914_1357'),
        ('product', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='productsalestype',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='sales_products', to=settings.AUTH_USER_MODEL, verbose_name='所属用户'),
        ),
        migrations.AddField(
            model_name='product',
            name='brand',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='product.Brand', verbose_name='产品品牌'),
        ),
        migrations.AddField(
            model_name='product',
            name='category',
            field=models.ManyToManyField(related_name='products', to='product.Category', verbose_name='产品所属分类'),
        ),
        migrations.AddField(
            model_name='product',
            name='creator',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='创建该产品的用户'),
        ),
        migrations.AddField(
            model_name='product',
            name='place_delivery',
            field=models.ForeignKey(blank=True, db_column='delivery_id', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='delivery_products', to='logistics.Region', verbose_name='发货地'),
        ),
        migrations.AddField(
            model_name='product',
            name='place_origin',
            field=models.ForeignKey(blank=True, db_column='origin_id', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='origin_products', to='logistics.Region', verbose_name='产地'),
        ),
        migrations.AddField(
            model_name='inventoryhistory',
            name='creator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='引起库存变更的用户'),
        ),
        migrations.AddField(
            model_name='inventoryhistory',
            name='spec',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='product.Spec', verbose_name='相关规格'),
        ),
        migrations.AddField(
            model_name='interactedproduct',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='users', to='product.Product', verbose_name='相关商品'),
        ),
        migrations.AddField(
            model_name='interactedproduct',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='interacted_products', to=settings.AUTH_USER_MODEL, verbose_name='所属用户'),
        ),
        migrations.AddField(
            model_name='category',
            name='parent',
            field=models.ForeignKey(blank=True, db_column='pid', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='product.Category', verbose_name='父级分类'),
        ),
        migrations.AddField(
            model_name='brand',
            name='creator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_brands', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='availablespec',
            name='spec',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='users', to='product.Spec', verbose_name='相关规格'),
        ),
        migrations.AddField(
            model_name='availablespec',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='available_specs', to=settings.AUTH_USER_MODEL, verbose_name='所属用户'),
        ),
    ]
