# Generated by Django 2.2 on 2019-04-02 02:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('news', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='sharenews',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户ID'),
        ),
        migrations.AddField(
            model_name='newsmodel',
            name='author',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='news', to=settings.AUTH_USER_MODEL, verbose_name='新闻作者'),
        ),
        migrations.AddField(
            model_name='newsmodel',
            name='category',
            field=models.ManyToManyField(related_name='news', to='news.CategoryModel', verbose_name='新闻的分类'),
        ),
        migrations.AddField(
            model_name='commentmodel',
            name='news',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='news.NewsModel', verbose_name='被评论的新闻'),
        ),
        migrations.AddField(
            model_name='commentmodel',
            name='parent_comment',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='son_comment', to='news.CommentModel', verbose_name='此评论的父评论'),
        ),
        migrations.AddField(
            model_name='commentmodel',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment', to=settings.AUTH_USER_MODEL, verbose_name='评论的用户'),
        ),
    ]
