# Generated by Django 3.1 on 2020-08-27 17:31

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import markdownx.models
import tagulous.models.fields
import tagulous.models.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BlogCategory',
            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')),
                ('path', models.TextField()),
                ('label', models.CharField(help_text='The name of the tag, without ancestors', max_length=255)),
                ('level', models.IntegerField(default=1, help_text='The level of the tag in the tree')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='blog.blogcategory')),
            ],
            options={
                'verbose_name_plural': 'Blog categories',
            },
            bases=(tagulous.models.models.BaseTagTreeModel, models.Model),
        ),
        migrations.CreateModel(
            name='BlogProperty',
            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={
                'verbose_name_plural': 'Blog properties',
            },
            bases=(tagulous.models.models.BaseTagModel, models.Model),
        ),
        migrations.CreateModel(
            name='BlogTag',
            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.CreateModel(
            name='MarkdownPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=250, unique=True)),
                ('slug', models.SlugField(help_text='SEO Friendly name that is unique for use in URL', max_length=250, unique=True)),
                ('teaser', markdownx.models.MarkdownxField(blank=True, help_text='Markdown Reference: <a href="https://commonmark.org/help/">https://commonmark.org/help/</a>', null=True)),
                ('content', markdownx.models.MarkdownxField(help_text='Markdown Reference: <a href="https://commonmark.org/help/">https://commonmark.org/help/</a>')),
                ('publish_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('expire_date', models.DateTimeField(blank=True, null=True)),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('modified_by', models.CharField(blank=True, max_length=255, null=True)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('categories', tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, force_lowercase=True, help_text="Splits on commas and spaces;  hierarchy is defined by paths.  Collectively known as a 'content taxonomy'.  This is often used as headings or to organizedifferent blog content.Ex: 'sports/nfl' 'sports/mlb' 'tech/sofware/linux'NOTE: unlike tags, categories should be well thought out beforehand and not change often", to='blog.BlogCategory', tree=True)),
                ('properties', tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, force_lowercase=True, help_text="Splits on commas and spaces; like tags but not displayed to the public.For example, you could tag posts with 'homepage' and or 'hidden' then pull all posts tagged 'homepage' but not 'hidden'", to='blog.BlogProperty')),
                ('tags', tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, force_lowercase=True, help_text="Splits on commas and spaces; tags will be displayed to the public and used to pull a set of posts to show.  For example, you could tag posts with 'docker' 'zfs' then the plugin will show these at the bottom for visitors to use if thereare more posts with that tag.", to='blog.BlogTag')),
            ],
            options={
                'ordering': ['-publish_date', 'title'],
            },
        ),
    ]
