# Generated by Django 3.1.4 on 2020-12-08 12:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('color', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='Product Name')),
                ('description', models.TextField(verbose_name='Product Description')),
                ('price', models.IntegerField(verbose_name='Price')),
                ('is_discounted', models.BooleanField(default=False, verbose_name='Is Discounted?')),
                ('discounted_price', models.IntegerField(null=True, verbose_name='Discounted Price')),
                ('rating', models.FloatField(verbose_name='Rating')),
                ('thumbnail', models.URLField(verbose_name='Thumbnail')),
                ('available_colors', models.ManyToManyField(to='product.Color', verbose_name='Available Colors')),
            ],
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.URLField(verbose_name='Image')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='product.product')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='available_sizes',
            field=models.ManyToManyField(to='product.Size', verbose_name='Available Sizes'),
        ),
    ]
