text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.21 on 2019-08-20 13:40
  from __future__ import unicode_literals
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Category',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=50, verbose_name='名称')),
                  ('status', models.PositiveIntegerField(choices=[(0, '删除'), (1, '正常')], default=1, verbose_name='状态')),
                  ('is_nav', models.BooleanField(default=False, verbose_name='是否为导航')),
                  ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
              ],
              options={
                  'verbose_name_plural': '分类',
                  'verbose_name': '分类',
              },
          ),
          migrations.CreateModel(
              name='Post',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=255, verbose_name='标题')),
                  ('desc', models.CharField(blank=True, max_length=1024, verbose_name='摘要')),
                  ('content', models.TextField(help_text='正文必须为MARKDOWN格式', verbose_name='正文')),
                  ('status', models.PositiveIntegerField(choices=[(0, '删除'), (1, '正常'), (2, '草稿')], default=1, verbose_name='状态')),
                  ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                  ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category', verbose_name='分类')),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
              ],
              options={
                  'ordering': ['id'],
                  'verbose_name_plural': '文章',
                  'verbose_name': '文章',
              },
          ),
          migrations.CreateModel(
              name='Tag',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=10, verbose_name='名称')),
                  ('status', models.PositiveIntegerField(choices=[(0, '删除'), (1, '正常')], default=1, verbose_name='状态')),
                  ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
              ],
              options={
                  'verbose_name_plural': '标签',
                  'verbose_name': '标签',
              },
          ),
          migrations.AddField(
              model_name='post',
              name='tag',
              field=models.ManyToManyField(to='blog.Tag', verbose_name='标签'),
          ),
      ]
  