# SPDX-FileCopyrightText: 2017-present Tobias Kunze
# SPDX-License-Identifier: AGPL-3.0-only WITH LicenseRef-Pretalx-AGPL-3.0-Terms

# Generated by Django 1.11.4 on 2017-08-30 23:13

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

import pretalx.common.models.mixins


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("submission", "0002_auto_20170820_1216"),
    ]

    operations = [
        migrations.CreateModel(
            name="Feedback",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False
                    ),
                ),
                ("rating", models.IntegerField(blank=True, null=True)),
                ("review", models.TextField()),
                (
                    "speaker",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="feedback",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            bases=(pretalx.common.models.mixins.LogMixin, models.Model),
        ),
        migrations.AddField(
            model_name="submission",
            name="accept_feedback",
            field=models.BooleanField(default=True),
        ),
        migrations.AlterField(
            model_name="submission",
            name="do_not_record",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="feedback",
            name="talk",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name="feedback",
                to="submission.Submission",
            ),
        ),
    ]
