# Generated by Django 3.0.5 on 2020-05-06 11:26

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


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0002_productimagetest'),
    ]

    operations = [
        migrations.CreateModel(
            name='ConditionCodes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('condition', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='ProductRating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='ProductReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.CharField(max_length=999)),
            ],
        ),
        migrations.CreateModel(
            name='Products',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('console', models.CharField(max_length=255)),
                ('manufacturer', models.CharField(max_length=255)),
                ('price', models.FloatField()),
                ('description', models.CharField(blank=True, max_length=4999)),
            ],
        ),
        migrations.CreateModel(
            name='ShippingCodes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code_name', models.CharField(max_length=255)),
            ],
        ),
        migrations.RenameModel(
            old_name='ProductCategoriesTest',
            new_name='ProductCategories',
        ),
        migrations.RenameModel(
            old_name='ProductImageTest',
            new_name='ProductImage',
        ),
        migrations.RenameField(
            model_name='productimage',
            old_name='image',
            new_name='images',
        ),
        migrations.DeleteModel(
            name='ProductsTest',
        ),
        migrations.AddField(
            model_name='products',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.ProductCategories'),
        ),
        migrations.AddField(
            model_name='products',
            name='condition',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.ConditionCodes'),
        ),
        migrations.AddField(
            model_name='products',
            name='shpping_code',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.ShippingCodes'),
        ),
        migrations.AddField(
            model_name='productreview',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.Products'),
        ),
        migrations.AddField(
            model_name='productrating',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.Products'),
        ),
        migrations.AlterField(
            model_name='productimage',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.Products'),
        ),
    ]
