# Generated by Django 3.2.20 on 2023-07-13 12:36

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

# Third party
import ckeditor_uploader.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("cms", "0022_auto_20180620_1551"),
    ]

    operations = [
        migrations.CreateModel(
            name="InterpretationQuiz",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=1024, verbose_name="Nom du quiz")),
                (
                    "questions_random",
                    models.BooleanField(
                        default=False, verbose_name="Questions aléatoires"
                    ),
                ),
                ("create_date", models.DateTimeField(auto_now_add=True)),
                ("description", ckeditor_uploader.fields.RichTextUploadingField()),
                (
                    "conclusion_max_1",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Conclusion pour maximum de ■ :"
                    ),
                ),
                (
                    "conclusion_max_2",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Conclusion pour maximum de ▲ :"
                    ),
                ),
                (
                    "conclusion_max_3",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Conclusion pour maximum de ◆ :"
                    ),
                ),
                (
                    "conclusion_max_4",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Conclusion pour maximum de ● :"
                    ),
                ),
            ],
            options={
                "verbose_name": "Quiz d'interprétation",
                "verbose_name_plural": "Quiz d'interprétation",
            },
        ),
        migrations.CreateModel(
            name="WeightedAnswersQuiz",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=1024, verbose_name="Nom du quiz")),
                (
                    "questions_random",
                    models.BooleanField(
                        default=False, verbose_name="Questions aléatoires"
                    ),
                ),
                ("create_date", models.DateTimeField(auto_now_add=True)),
                ("description", ckeditor_uploader.fields.RichTextUploadingField()),
            ],
            options={
                "verbose_name": "Quiz avec réponses pondérées",
                "verbose_name_plural": "Quiz avec réponses pondérées",
            },
        ),
        migrations.CreateModel(
            name="WeightedAnswersQuizQuestion",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("label", models.CharField(max_length=1024, verbose_name="Question")),
                (
                    "multiple_answers",
                    models.BooleanField(
                        default=False, verbose_name="Plusieurs réponses autorisées"
                    ),
                ),
                (
                    "answer_1",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Réponse 1"
                    ),
                ),
                (
                    "points_answer_1",
                    models.IntegerField(verbose_name="Points pour la réponse 1"),
                ),
                (
                    "answer_2",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 2"
                    ),
                ),
                (
                    "points_answer_2",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="Points pour la réponse 2"
                    ),
                ),
                (
                    "answer_3",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 3"
                    ),
                ),
                (
                    "points_answer_3",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="Points pour la réponse 3"
                    ),
                ),
                (
                    "answer_4",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 4"
                    ),
                ),
                (
                    "points_answer_4",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="Points pour la réponse 4"
                    ),
                ),
                (
                    "answer_5",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 5"
                    ),
                ),
                (
                    "points_answer_5",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="Points pour la réponse 5"
                    ),
                ),
                (
                    "answer_6",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 6"
                    ),
                ),
                (
                    "points_answer_6",
                    models.IntegerField(
                        blank=True, null=True, verbose_name="Points pour la réponse 6"
                    ),
                ),
                (
                    "quiz",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="django_easy_quiz.weightedanswersquiz",
                    ),
                ),
            ],
            options={
                "verbose_name": "Question de quiz avec réponses pondérées",
                "verbose_name_plural": "Questions de quiz avec réponses pondérées",
            },
        ),
        migrations.CreateModel(
            name="WeightedAnswersQuizConclusion",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("description", ckeditor_uploader.fields.RichTextUploadingField()),
                (
                    "min_points",
                    models.IntegerField(
                        verbose_name="Montant minimal de points (inclus)"
                    ),
                ),
                (
                    "max_points",
                    models.IntegerField(
                        verbose_name="Montant maximal de points (inclus)"
                    ),
                ),
                (
                    "quiz",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="django_easy_quiz.weightedanswersquiz",
                    ),
                ),
            ],
            options={
                "verbose_name": "Conclusion de quiz avec réponses pondérées",
                "verbose_name_plural": "Conclusions de quiz avec réponses pondérées",
            },
        ),
        migrations.CreateModel(
            name="WeightedAnswersPlugin",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="django_easy_quiz_weightedanswersplugin",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "title_level",
                    models.CharField(
                        choices=[
                            ("h1", "Titre niveau 1 (<h1>)"),
                            ("h2", "Titre niveau 2 (<h2>)"),
                            ("h3", "Titre niveau 3 (<h3>)"),
                            ("h4", "Titre niveau 4 (<h4>)"),
                            ("h5", "Titre niveau 5 (<h5>)"),
                            ("h6", "Titre niveau 6 (<h6>)"),
                        ],
                        max_length=4,
                    ),
                ),
                (
                    "short_description",
                    models.CharField(
                        blank=True,
                        max_length=1024,
                        null=True,
                        verbose_name="Description courte",
                    ),
                ),
                (
                    "button_text",
                    models.CharField(
                        blank=True,
                        max_length=1024,
                        null=True,
                        verbose_name="Texte du bouton",
                    ),
                ),
                (
                    "quiz",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="django_easy_quiz.weightedanswersquiz",
                    ),
                ),
            ],
            options={
                "verbose_name": "Quiz avec réponses pondérées",
                "verbose_name_plural": "Quiz avec réponses pondérées",
            },
            bases=("cms.cmsplugin", models.Model),
        ),
        migrations.CreateModel(
            name="InterpretationQuizQuestion",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("label", models.CharField(max_length=1024, verbose_name="Question")),
                (
                    "answer_1",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        verbose_name="Réponse 1 (■)"
                    ),
                ),
                (
                    "answer_2",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 2 (▲)"
                    ),
                ),
                (
                    "answer_3",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 3 (◆)"
                    ),
                ),
                (
                    "answer_4",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, null=True, verbose_name="Réponse 4 (●)"
                    ),
                ),
                (
                    "quiz",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="django_easy_quiz.interpretationquiz",
                    ),
                ),
            ],
            options={
                "verbose_name": "Question de quiz d'interprétation",
                "verbose_name_plural": "Questions de quiz d'interprétation",
            },
        ),
        migrations.CreateModel(
            name="InterpretationPlugin",
            fields=[
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="django_easy_quiz_interpretationplugin",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "title_level",
                    models.CharField(
                        choices=[
                            ("h1", "Titre niveau 1 (<h1>)"),
                            ("h2", "Titre niveau 2 (<h2>)"),
                            ("h3", "Titre niveau 3 (<h3>)"),
                            ("h4", "Titre niveau 4 (<h4>)"),
                            ("h5", "Titre niveau 5 (<h5>)"),
                            ("h6", "Titre niveau 6 (<h6>)"),
                        ],
                        max_length=4,
                    ),
                ),
                (
                    "short_description",
                    models.CharField(
                        blank=True,
                        max_length=1024,
                        null=True,
                        verbose_name="Description courte",
                    ),
                ),
                (
                    "button_text",
                    models.CharField(
                        blank=True,
                        max_length=1024,
                        null=True,
                        verbose_name="Texte du bouton",
                    ),
                ),
                (
                    "quiz",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="django_easy_quiz.interpretationquiz",
                    ),
                ),
            ],
            options={
                "verbose_name": "Quiz d'interprétation",
                "verbose_name_plural": "Quiz d'interprétation",
            },
            bases=("cms.cmsplugin", models.Model),
        ),
    ]
