# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-02 02:33
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('database', '0002_account_friend'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(db_index=True, max_length=128)),
                ('summary', models.CharField(db_index=True, default=None, max_length=512)),
                ('text', models.TextField(default=None, max_length=9999999999)),
                ('read_num', models.SmallIntegerField(default=0)),
                ('comment_num', models.SmallIntegerField(default=0)),
                ('like_num', models.SmallIntegerField(default=0)),
                ('dislike_num', models.SmallIntegerField(default=0)),
                ('create_date', models.DateField(auto_now_add=True)),
                ('modify_date', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(db_index=True, max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('comment_type', models.SmallIntegerField(default=1)),
                ('comment_text', models.CharField(db_index=True, default=None, max_length=512)),
                ('comment_date', models.DateField(auto_now_add=True)),
                ('coment_retry', models.CharField(db_index=True, default=None, max_length=512)),
                ('coment_retry_date', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.RenameField(
            model_name='account',
            old_name='modified_date',
            new_name='modify_date',
        ),
        migrations.AddField(
            model_name='comment',
            name='account',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Account'),
        ),
        migrations.AddField(
            model_name='comment',
            name='artical',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Article'),
        ),
        migrations.AddField(
            model_name='article',
            name='account',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Account'),
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ManyToManyField(to='database.Category'),
        ),
    ]
