# Generated by Django 3.1.6 on 2021-03-04 11:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('travelapp', '0005_auto_20210302_2303'),
        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')),
                ('content', models.TextField(verbose_name='Текст')),
                ('added_at', models.DateTimeField(db_index=True, verbose_name='Время добавления')),
                ('is_allowed', models.BooleanField(db_index=True, verbose_name='Прошёл модерацию')),
                ('is_active', models.BooleanField(db_index=True, verbose_name='Не удалён')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
            ],
        ),
        migrations.CreateModel(
            name='CommentPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added_at', models.DateTimeField(verbose_name='Добавлено')),
                ('image', models.ImageField(upload_to='static/comment_media')),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='socialapp.comment', verbose_name='Комментарий')),
            ],
        ),
        migrations.CreateModel(
            name='TripComment',
            fields=[
                ('comment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='socialapp.comment')),
                ('score', models.IntegerField(choices=[(1, 'Ужасно'), (2, 'Плохо'), (3, 'Средне'), (4, 'Хорошо'), (5, 'Отлично')], verbose_name='Оценка похода')),
                ('trip', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='travelapp.trip', verbose_name='Поход')),
            ],
            bases=('socialapp.comment',),
        ),
    ]
