# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-04-18 09:26
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):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('article', '0009_remove_articles_pdf'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('submit_date', models.DateTimeField(auto_now_add=True)),
                ('artid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post_comment', to='article.Articles')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_comment', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-submit_date',),
            },
        ),
        migrations.CreateModel(
            name='CommentsReply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('submit_date', models.DateTimeField(auto_now_add=True)),
                ('art_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reply_article', to='article.Articles')),
                ('author_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_reply', to=settings.AUTH_USER_MODEL)),
                ('author_to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reply_to', to=settings.AUTH_USER_MODEL)),
                ('comment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reply_comment', to='article.Comments')),
            ],
            options={
                'ordering': ('submit_date',),
            },
        ),
    ]
