# Generated by Django 3.1.2 on 2020-11-12 17:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_auto_20201028_2242'),
    ]

    operations = [
        migrations.CreateModel(
            name='Listing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('color', models.CharField(max_length=100)),
                ('size', models.CharField(max_length=100)),
                ('discount', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('price', models.IntegerField()),
                ('productType', models.CharField(choices=[('F', 'Fish'), ('A', 'Accessory')], max_length=1)),
                ('isAllowed', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('revenue', models.FloatField()),
            ],
        ),
        migrations.RemoveField(
            model_name='user',
            name='email',
        ),
        migrations.RemoveField(
            model_name='user',
            name='location',
        ),
        migrations.RemoveField(
            model_name='user',
            name='mobile',
        ),
        migrations.RemoveField(
            model_name='user',
            name='name',
        ),
        migrations.RemoveField(
            model_name='user',
            name='password',
        ),
        migrations.RemoveField(
            model_name='user',
            name='userType',
        ),
        migrations.AddField(
            model_name='user',
            name='uid',
            field=models.CharField(default='empty', max_length=100),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.CharField(max_length=512)),
                ('stars', models.IntegerField()),
                ('listing_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='core.listing')),
            ],
        ),
        migrations.AddField(
            model_name='listing',
            name='accessories',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='accessory', to='core.product'),
        ),
        migrations.AddField(
            model_name='listing',
            name='product_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='core.product'),
        ),
        migrations.AddField(
            model_name='listing',
            name='shop_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='core.shop'),
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('listing_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='core.listing')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='core.user')),
            ],
        ),
    ]
