# Generated by Django 5.0.3 on 2024-03-20 14:30

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


class Migration(migrations.Migration):
    dependencies = [
        ("sites_conformes_content_manager", "0017_tag_contentpage_header_cta_text_and_more"),
        ("wagtailmenus", "0023_remove_use_specific"),
    ]

    operations = [
        migrations.CreateModel(
            name="MegaMenu",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=255, verbose_name="Name")),
                ("description", models.TextField(blank=True, verbose_name="Description")),
                ("main_link", models.URLField(blank=True, null=True, verbose_name="Main link")),
                (
                    "parent_menu_item",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="megamenu_parent_menu_items",
                        to="wagtailmenus.mainmenuitem",
                    ),
                ),
            ],
            options={
                "verbose_name": "Mega menu",
            },
        ),
        migrations.CreateModel(
            name="MegaMenuCategory",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("sort_order", models.IntegerField(blank=True, editable=False, null=True)),
                (
                    "category",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="wagtailmenus.flatmenu",
                        verbose_name="Category",
                    ),
                ),
                (
                    "mega_menu",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="categories",
                        to="sites_conformes_content_manager.megamenu",
                    ),
                ),
            ],
            options={
                "verbose_name": "Mega menu category",
                "verbose_name_plural": "Mega menu categories",
            },
        ),
    ]
