# Generated by Django 3.1.7 on 2021-06-18 08:45

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),
        ('product', '0001_initial'),
        ('user', '0001_initial'),
        ('staff', '0002_staff_storage'),
        ('order', '0002_auto_20210618_1545'),
    ]

    operations = [
        migrations.AddField(
            model_name='productinstock',
            name='storage',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='staff.storage', verbose_name='Kho'),
        ),
        migrations.AddField(
            model_name='productimage',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.product'),
        ),
        migrations.AddField(
            model_name='product',
            name='manufacturer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.manufacturer', verbose_name='Nhà sản xuất'),
        ),
        migrations.AddField(
            model_name='manufacturer',
            name='ad',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='staff.address', verbose_name='Địa chỉ'),
        ),
        migrations.AddField(
            model_name='itemincart',
            name='cart',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.cart'),
        ),
        migrations.AddField(
            model_name='itemincart',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.item'),
        ),
        migrations.AddField(
            model_name='itemincart',
            name='order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='order.order'),
        ),
        migrations.AddField(
            model_name='item',
            name='product',
            field=models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to='product.product'),
        ),
        migrations.AddField(
            model_name='comment',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.item'),
        ),
        migrations.AddField(
            model_name='comment',
            name='sentiment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='product.sentiment'),
        ),
        migrations.AddField(
            model_name='bookgenre',
            name='genre',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.genre'),
        ),
        migrations.AddField(
            model_name='author',
            name='fullname',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='staff.fullname', verbose_name='Họ và tên'),
        ),
        migrations.CreateModel(
            name='Appliance',
            fields=[
                ('electronic_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='product.electronic')),
                ('width', models.CharField(max_length=100)),
                ('height', models.FloatField()),
                ('length', models.FloatField()),
                ('type_of_appliance', models.CharField(max_length=100)),
            ],
            bases=('product.electronic',),
        ),
        migrations.CreateModel(
            name='Mobile',
            fields=[
                ('electronic_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='product.electronic')),
                ('dimension', models.FloatField()),
                ('device_type', models.CharField(max_length=100)),
            ],
            bases=('product.electronic',),
        ),
        migrations.AddField(
            model_name='clothing',
            name='type_of_clothing',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.clothingtype', verbose_name='Loại'),
        ),
        migrations.AddField(
            model_name='book',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.author', verbose_name='Tác giả'),
        ),
        migrations.AddField(
            model_name='book',
            name='book_status',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='product.bookstatus', verbose_name='Tình trạng'),
        ),
    ]
