# Generated by Django 2.2.6 on 2020-12-26 10:21

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('rating', models.DecimalField(decimal_places=0, max_digits=1, verbose_name='Оценка')),
                ('text', models.CharField(max_length=500, verbose_name='Текст комментария')),
                ('add_text', models.TextField(default='', verbose_name='Текст дополнения')),
                ('add_text_date', models.DateTimeField(auto_now=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_author', to=settings.AUTH_USER_MODEL, verbose_name='Автор комментария')),
            ],
            options={
                'ordering': ['-date'],
            },
        ),
        migrations.CreateModel(
            name='CommentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Reply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('text', models.CharField(max_length=255, verbose_name='Текст дополнения к комментарию')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reply_author', to=settings.AUTH_USER_MODEL, verbose_name='Автор дополнения к комментарию')),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reply', to='comments.Comment', verbose_name='Комментарий')),
            ],
        ),
        migrations.CreateModel(
            name='ImageComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('images_comment', models.ImageField(blank=True, null=True, upload_to='comments/%Y/%m/%d/', verbose_name='Изображения')),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='comments.Comment', verbose_name='Комментарий')),
            ],
        ),
        migrations.CreateModel(
            name='ComplaintReply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('complaint', models.CharField(max_length=50, verbose_name='Жалоба')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='complaint_reply_author', to=settings.AUTH_USER_MODEL, verbose_name='Автор жалобы')),
                ('reply', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='complaints', to='comments.Reply', verbose_name='Ответ')),
            ],
        ),
        migrations.CreateModel(
            name='ComplaintComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('complaint', models.CharField(max_length=50, verbose_name='Жалоба')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='complaint_comment_author', to=settings.AUTH_USER_MODEL, verbose_name='Автор жалобы')),
                ('comment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='complaints', to='comments.Comment', verbose_name='Комментарий')),
            ],
        ),
    ]
