# Generated by Django 3.0.7 on 2023-06-14 08:13

import datetime
from django.db import migrations, models
import django.db.models.deletion
import mdeditor.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CategoryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(max_length=20, verbose_name='文章分类')),
            ],
            options={
                'verbose_name': '文章分类',
                'verbose_name_plural': '文章分类',
            },
        ),
        migrations.CreateModel(
            name='BlogModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, null=True, verbose_name='标题')),
                ('create_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('content', mdeditor.fields.MDTextField(verbose_name='内容')),
                ('read_count', models.IntegerField(default=0, verbose_name='阅读数')),
                ('favorite', models.IntegerField(default=0, verbose_name='收藏数')),
                ('username', models.CharField(max_length=20, null=True, verbose_name='作者')),
                ('describe', models.CharField(max_length=2500, null=True, verbose_name='简介')),
                ('cover', models.ImageField(default='image/default.png', max_length=200, null=True, upload_to='blog/image/%Y/%m', verbose_name='封面')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.CategoryModel', verbose_name='文章分类')),
            ],
            options={
                'verbose_name': '文章信息',
                'verbose_name_plural': '文章信息',
            },
        ),
    ]
