# Generated by Django 3.1.7 on 2021-03-18 16:31

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='Menu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='Имя')),
                ('is_auth', models.BooleanField(default=False, verbose_name='Авторизация')),
                ('active', models.BooleanField(default=True, verbose_name='Активно')),
            ],
        ),
        migrations.CreateModel(
            name='ElementsOfMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Название на латинеце')),
                ('title', models.CharField(max_length=200, verbose_name='Название на русском')),
                ('status', models.BooleanField(default=True, verbose_name='Статус')),
                ('is_auth', models.BooleanField(default=False, verbose_name='Для авторизированных')),
                ('anchor', models.CharField(max_length=15, verbose_name='Якорь')),
                ('url', models.SlugField(max_length=100, verbose_name='Ссылка на внешний ресурс')),
                ('active', models.BooleanField(default=True, verbose_name='Активно')),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('menu', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Меню', to='menu.menu')),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='menu.elementsofmenu', verbose_name='Родительский элемент меню')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
