# Generated by Django 4.0rc1 on 2021-12-06 11:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="CookieCategory",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "ordering",
                    models.PositiveIntegerField(default=0, verbose_name="ordering"),
                ),
                ("name", models.SlugField(unique=True, verbose_name="technical name")),
                (
                    "title_en",
                    models.CharField(
                        blank=True, default="", max_length=200, verbose_name="title"
                    ),
                ),
                (
                    "title_de",
                    models.CharField(
                        blank=True, default="", max_length=200, verbose_name="title"
                    ),
                ),
                (
                    "description_en",
                    models.TextField(blank=True, verbose_name="description"),
                ),
                (
                    "description_de",
                    models.TextField(blank=True, verbose_name="description"),
                ),
                (
                    "acceptance",
                    models.CharField(
                        choices=[
                            ("optional", "optional"),
                            ("recommended", "recommended"),
                            ("mandatory", "mandatory"),
                        ],
                        default="optional",
                        max_length=20,
                        verbose_name="acceptance",
                    ),
                ),
            ],
            options={
                "verbose_name": "cookie category",
                "verbose_name_plural": "cookie categories",
                "ordering": ["ordering"],
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="CookieScript",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.SlugField(unique=True, verbose_name="technical name")),
                (
                    "inject_if",
                    models.TextField(
                        blank=True,
                        help_text="HTML code to inject if cookie category is accepted.",
                        verbose_name="inject if",
                    ),
                ),
                (
                    "inject_else",
                    models.TextField(
                        blank=True,
                        help_text="HTML code to inject if cookie category is rejected.",
                        verbose_name="inject else",
                    ),
                ),
                (
                    "category",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="feincms3_cookiecontrol.cookiecategory",
                    ),
                ),
            ],
            options={
                "verbose_name": "cookie script",
                "verbose_name_plural": "cookie scripts",
                "ordering": ("name",),
            },
        ),
    ]
