# Generated by Django 3.1.2 on 2020-12-23 04:34

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0006_auto_20201223_0434'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='WikiArticleModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120, verbose_name='Заголовок')),
                ('slug', models.SlugField(max_length=140, verbose_name='ЧПУ')),
                ('content', models.CharField(max_length=600, verbose_name='Контент')),
                ('is_publish', models.BooleanField(default=False, verbose_name='Опубликованна ли страница')),
                ('order', models.PositiveIntegerField(default=0, help_text='От максимума к минимому', verbose_name='Метрика')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Время создания')),
                ('date_update', models.DateTimeField(auto_now=True, verbose_name='Дата обновления')),
                ('path', models.CharField(blank=True, max_length=120, null=True, verbose_name='Путь')),
                ('level', models.PositiveIntegerField(db_index=True, verbose_name='Уровень')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
                ('change_user', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Последний изменивший')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wiki.wikiarticlemodel', verbose_name='Родитель')),
            ],
            options={
                'verbose_name': 'Запись в вики',
                'verbose_name_plural': 'Записи в вики',
                'ordering': ['order'],
            },
            managers=[
                ('node_manager', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='WikiPermModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.customgroup', verbose_name='Группы')),
                ('node', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='wiki.wikiarticlemodel', verbose_name='Запись в вики')),
            ],
            options={
                'verbose_name': 'Разрешение',
                'verbose_name_plural': 'Разрешения',
            },
            managers=[
                ('manager_perm', django.db.models.manager.Manager()),
            ],
        ),
    ]

# Generated by Django 3.1.2 on 2020-12-23 04:34

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('base', '0006_auto_20201223_0434'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='WikiArticleModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120, verbose_name='Заголовок')),
                ('slug', models.SlugField(max_length=140, verbose_name='ЧПУ')),
                ('content', models.CharField(max_length=600, verbose_name='Контент')),
                ('is_publish', models.BooleanField(default=False, verbose_name='Опубликованна ли страница')),
                ('order', models.PositiveIntegerField(default=0, help_text='От максимума к минимому', verbose_name='Метрика')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Время создания')),
                ('date_update', models.DateTimeField(auto_now=True, verbose_name='Дата обновления')),
                ('path', models.CharField(blank=True, max_length=120, null=True, verbose_name='Путь')),
                ('level', models.PositiveIntegerField(db_index=True, verbose_name='Уровень')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
                ('change_user', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Последний изменивший')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wiki.wikiarticlemodel', verbose_name='Родитель')),
            ],
            options={
                'verbose_name': 'Запись в вики',
                'verbose_name_plural': 'Записи в вики',
                'ordering': ['order'],
            },
            managers=[
                ('node_manager', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='WikiPermModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.customgroup', verbose_name='Группы')),
                ('node', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='wiki.wikiarticlemodel', verbose_name='Запись в вики')),
            ],
            options={
                'verbose_name': 'Разрешение',
                'verbose_name_plural': 'Разрешения',
            },
            managers=[
                ('manager_perm', django.db.models.manager.Manager()),
            ],
        ),
    ]

# Generated by Django 3.1.2 on 2020-12-23 04:34