# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-09-11 02:14
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=64, verbose_name='标题')),
                ('head_img', models.ImageField(upload_to='')),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('alter_time', models.DateTimeField(auto_now=True)),
                ('abstract', models.CharField(blank=True, help_text='默认摘取文章前40个字', max_length=40, null=True, verbose_name='摘要')),
                ('content', models.TextField(verbose_name='内容')),
                ('priority', models.IntegerField(default=100, verbose_name='优先级')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=26)),
                ('alter_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category'),
        ),
    ]
