# Generated by Django 2.2.5 on 2023-08-30 02:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=20, verbose_name='カテゴリー')),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='thumbnail', verbose_name='サムネイル（空欄可）')),
            ],
            options={
                'verbose_name': 'ブログカテゴリーリスト',
                'verbose_name_plural': 'ブログカテゴリーリスト',
            },
        ),
        migrations.CreateModel(
            name='Popular',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='人気記事')),
                ('path', models.CharField(max_length=100, verbose_name='URL')),
                ('view', models.IntegerField(verbose_name='閲覧数')),
            ],
            options={
                'verbose_name': '人気記事リスト',
                'verbose_name_plural': '人気記事リスト',
            },
        ),
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150, verbose_name='タイトル')),
                ('text', markdownx.models.MarkdownxField(help_text='Markdown形式で書いてください。', verbose_name='テキスト')),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateField(auto_now=True)),
                ('is_publick', models.BooleanField(choices=[(True, '公開'), (False, '非公開')], verbose_name='選択')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='blogs.Category')),
            ],
            options={
                'verbose_name': 'ブログリスト',
                'verbose_name_plural': 'ブログリスト',
            },
        ),
    ]
