# Generated by Django 4.0.2 on 2022-02-11 05:58

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),
        ('blog', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='article',
            name='allow_comments',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='article',
            name='author_name',
            field=models.CharField(blank=True, help_text='Ex. John Doe', max_length=150, null=True, verbose_name='Custom author name'),
        ),
        migrations.AddField(
            model_name='article',
            name='like',
            field=models.ManyToManyField(blank=True, null=True, related_name='like', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='article',
            name='view',
            field=models.ManyToManyField(blank=True, null=True, related_name='view', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('abstractcommonfields_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='blog.abstractcommonfields')),
                ('body', models.TextField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Comment',
                'verbose_name_plural': 'Comments',
                'ordering': ['-id'],
            },
            bases=('blog.abstractcommonfields',),
        ),
        migrations.AddField(
            model_name='article',
            name='comments',
            field=models.ManyToManyField(blank=True, null=True, related_name='comment', to='blog.Comment'),
        ),
    ]
