# Generated by Django 2.2.6 on 2019-11-03 14:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('image', models.ImageField(blank=True, null=True, upload_to=product.models.upload_image_path)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to=product.models.upload_image_path)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pname', models.CharField(max_length=200, verbose_name='Product Family')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='Date created')),
            ],
        ),
        migrations.CreateModel(
            name='ProductOption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('op_name', models.CharField(max_length=200, verbose_name='Option Name')),
                ('op_value', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ProductVariant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sku', models.CharField(max_length=200, verbose_name='SKU')),
                ('url', models.CharField(blank=True, default='', max_length=200)),
                ('description', models.CharField(blank=True, max_length=200, verbose_name='Detail Description')),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='Date created')),
                ('price', models.FloatField(default=0.0, verbose_name='Price')),
                ('is_active', models.BooleanField(blank=True, default=True)),
                ('images', models.ManyToManyField(to='product.Image')),
                ('options', models.ManyToManyField(to='product.ProductOption')),
                ('product_category', models.ManyToManyField(to='product.Category')),
                ('product_family', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product', to='product.Product')),
            ],
        ),
    ]
