# Generated by Django 3.2 on 2021-06-25 09:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('brand', models.CharField(blank=True, max_length=20, null=True)),
                ('color', models.CharField(blank=True, max_length=20, null=True)),
                ('weight', models.DecimalField(blank=True, decimal_places=1, max_digits=8, null=True)),
                ('demographic', models.CharField(blank=True, choices=[('m', 'male'), ('f', 'woman'), ('c', 'child')], max_length=1, null=True)),
                ('price_per_unit', models.DecimalField(decimal_places=2, max_digits=20)),
                ('discount_per_unit', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=2)),
                ('sku', models.CharField(default='djan-dja-<django.db.models.fields.CharField>54', max_length=14)),
                ('slug', models.SlugField(default=models.CharField(default='djan-dja-<django.db.models.fields.CharField>54', max_length=14), max_length=80, unique=True)),
                ('category', models.ManyToManyField(to='shop.Category')),
            ],
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='images/product/')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.product')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=2)),
                ('products', models.ManyToManyField(to='shop.Product')),
            ],
        ),
    ]
