# Generated by Django 3.2.3 on 2021-10-02 17:24

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


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(help_text='required and unique', max_length=255, verbose_name='category name')),
                ('slug', models.SlugField(help_text='letters, numbers, underscores or hyphens', max_length=255, verbose_name='category safe URL')),
                ('is_active', models.BooleanField(default=True)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, help_text='select <b>parent</b> category', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='children', to='inventory.category', verbose_name='parent category')),
            ],
            options={
                'verbose_name': 'product category',
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('web_id', models.CharField(help_text='must be unique', max_length=50, unique=True, verbose_name='product website ID')),
                ('slug', models.SlugField(max_length=255)),
                ('name', models.CharField(help_text='required', max_length=255, verbose_name='product name')),
                ('description', models.TextField(help_text='product description', verbose_name='description')),
                ('is_active', models.BooleanField(default=True, help_text='Change product visibility', verbose_name='Product visibility')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
                ('category', mptt.fields.TreeManyToManyField(to='inventory.Category')),
            ],
        ),
    ]
