# Generated by Django 3.2.14 on 2022-07-21 18:36

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


class Migration(migrations.Migration):
    dependencies = [
        ('inventory', '0010_version_protect_models'),
    ]

    operations = [
        migrations.AddField(
            model_name='itemmodel',
            name='level',
            field=models.PositiveSmallIntegerField(blank=True, editable=False, null=True),
        ),
        migrations.AddField(
            model_name='itemmodel',
            name='path',
            field=models.JSONField(blank=True, editable=False, null=True),
        ),
        migrations.AddField(
            model_name='itemmodel',
            name='path_str',
            field=models.TextField(blank=True, editable=False, null=True),
        ),
        migrations.AddField(
            model_name='locationmodel',
            name='level',
            field=models.PositiveSmallIntegerField(blank=True, editable=False, null=True),
        ),
        migrations.AddField(
            model_name='locationmodel',
            name='path',
            field=models.JSONField(blank=True, editable=False, null=True),
        ),
        migrations.AddField(
            model_name='locationmodel',
            name='path_str',
            field=models.TextField(blank=True, editable=False, null=True),
        ),
        migrations.AlterField(
            model_name='itemmodel',
            name='parent',
            field=models.ForeignKey(
                blank=True,
                help_text='LocationModel.parent.help_text',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='inventory.itemmodel',
                verbose_name='LocationModel.parent.verbose_name',
            ),
        ),
        migrations.CreateModel(
            name='Tagulous_BaseParentTreeModel_tags',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                ('name', models.CharField(max_length=255, unique=True)),
                ('slug', models.SlugField()),
                (
                    'count',
                    models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use'),
                ),
                (
                    'protected',
                    models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0'),
                ),
            ],
            options={
                'ordering': ('name',),
                'abstract': False,
                'unique_together': {('slug',)},
            },
            bases=(tagulous.models.models.BaseTagModel, models.Model),
        ),
        migrations.AlterModelOptions(
            name='itemmodel',
            options={
                'ordering': ('path_str',),
                'verbose_name': 'ItemModel.verbose_name',
                'verbose_name_plural': 'ItemModel.verbose_name_plural',
            },
        ),
        migrations.AlterModelOptions(
            name='locationmodel',
            options={
                'ordering': ('path_str',),
                'verbose_name': 'LocationModel.verbose_name',
                'verbose_name_plural': 'LocationModel.verbose_name_plural',
            },
        ),
    ]
