# Generated by Django 3.0b1 on 2019-11-17 09:55

import ckeditor_uploader.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('content', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PostCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_created=True, verbose_name='创建时间')),
                ('title', models.CharField(blank=True, max_length=64, null=True, verbose_name='分类名')),
            ],
            options={
                'verbose_name': '文章分类',
                'verbose_name_plural': '文章分类',
                'db_table': 'post_category',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateField(auto_created=True, verbose_name='创建时间')),
                ('title', models.CharField(blank=True, max_length=128, verbose_name='标题')),
                ('desc', models.CharField(blank=True, max_length=256, null=True, verbose_name='简介')),
                ('read_num', models.ImageField(default=0, upload_to='', verbose_name='阅读量')),
                ('md_content', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='内容')),
                ('html_content', models.TextField(blank=True, null=True, verbose_name='markdown')),
                ('is_hide', models.BooleanField(blank=True, default=False, verbose_name='是否隐藏')),
                ('is_top', models.BooleanField(blank=True, default=False, verbose_name='是否置顶')),
                ('category', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='posts', to='post.PostCategory')),
                ('tags', models.ManyToManyField(blank=True, db_constraint=False, related_name='posts', to='content.Tags')),
            ],
            options={
                'verbose_name': '文章',
                'verbose_name_plural': '文章',
                'db_table': 'post',
            },
        ),
    ]
