# Generated by Django 3.1 on 2020-10-10 13:07

from django.db import migrations, models
import django.db.models.deletion
import i18nfield.fields
import pretalx.common.mixins.models


class Migration(migrations.Migration):

    dependencies = [
        ("event", "0024_remove_team_review_override_votes"),
        ("submission", "0051_remove_review_override_vote"),
    ]

    operations = [
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True, null=True)),
                ("tag", models.CharField(max_length=50)),
                ("description", i18nfield.fields.I18nTextField()),
                ("color", models.CharField(max_length=7)),
                ("public", models.BooleanField(default=False)),
                (
                    "event",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="tags",
                        to="event.event",
                    ),
                ),
            ],
            bases=(pretalx.common.mixins.models.LogMixin, models.Model),
        ),
        migrations.AddField(
            model_name="submission",
            name="tags",
            field=models.ManyToManyField(
                related_name="submissions", to="submission.Tag"
            ),
        ),
    ]
