# Generated by Django 3.0 on 2019-12-09 10:05

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),
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=191, verbose_name='code')),
                ('name', models.CharField(max_length=191, verbose_name='name')),
                ('slug', models.SlugField(editable=False, unique=True, verbose_name='slug')),
                ('created_on', models.DateTimeField(auto_now_add=True, null=True, verbose_name='created on')),
                ('updated_on', models.DateTimeField(auto_now=True, null=True, verbose_name='updated on')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='created by')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='updated by')),
            ],
            options={
                'verbose_name': 'product',
                'verbose_name_plural': 'products',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ProductPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='price')),
                ('start_date', models.DateField(verbose_name='start date')),
                ('end_date', models.DateField(verbose_name='end date')),
                ('created_on', models.DateTimeField(auto_now_add=True, null=True, verbose_name='created on')),
                ('updated_on', models.DateTimeField(auto_now=True, null=True, verbose_name='updated on')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Product', verbose_name='product')),
            ],
            options={
                'verbose_name': 'product price',
                'verbose_name_plural': 'products prices',
            },
        ),
        migrations.CreateModel(
            name='ProductAttribute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('color', models.CharField(max_length=191, verbose_name='product color')),
                ('size', models.CharField(max_length=191, verbose_name='size')),
                ('created_on', models.DateTimeField(auto_now_add=True, null=True, verbose_name='created on')),
                ('updated_on', models.DateTimeField(auto_now=True, null=True, verbose_name='updated on')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Product', verbose_name='product')),
            ],
            options={
                'verbose_name': 'product attribute',
                'verbose_name_plural': 'products attributes',
            },
        ),
    ]
