# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-23 09:57
from __future__ import unicode_literals

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ArticleColumn',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('column', models.CharField(max_length=128, verbose_name='\u7c7b\u76ee\u540d')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('id', 'column'),
                'verbose_name': '\u535a\u5ba2\u680f\u76ee',
                'verbose_name_plural': '\u535a\u5ba2\u680f\u76ee',
            },
        ),
        migrations.CreateModel(
            name='ArticleComments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=90)),
                ('email', models.EmailField(max_length=254)),
                ('body', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='ArticlePost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300, verbose_name='\u6807\u9898')),
                ('slug', models.SlugField(max_length=100)),
                ('body', models.TextField(verbose_name='\u5185\u5bb9')),
                ('created', models.DateTimeField(default=datetime.datetime(2018, 3, 23, 9, 57, 16, 885386, tzinfo=utc), verbose_name='\u53d1\u5e03\u65f6\u95f4')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='\u66f4\u65b0\u65f6\u95f4')),
                ('article_column', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='article_column', to='blog.ArticleColumn', verbose_name='\u7c7b\u76ee\u540d')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='article', to=settings.AUTH_USER_MODEL, verbose_name='\u4f5c\u8005')),
            ],
            options={
                'ordering': ('title',),
            },
        ),
        migrations.AddField(
            model_name='articlecomments',
            name='article',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='blog.ArticlePost'),
        ),
        migrations.AlterIndexTogether(
            name='articlepost',
            index_together=set([('id', 'slug')]),
        ),
    ]
