# Generated by Django 5.2.8 on 2025-12-06 15:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("app", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Module",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                (
                    "path",
                    models.CharField(
                        blank=True,
                        help_text="Base path for the app, starting with /",
                        max_length=100,
                    ),
                ),
                (
                    "menu",
                    models.CharField(
                        blank=True,
                        help_text="Text used for the navbar pill; defaults to the application name.",
                        max_length=100,
                    ),
                ),
                (
                    "priority",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Lower values appear first in navigation pills.",
                    ),
                ),
                ("is_default", models.BooleanField(default=False)),
                (
                    "favicon",
                    models.ImageField(blank=True, upload_to="modules/favicons/"),
                ),
                (
                    "security_mode",
                    models.CharField(
                        choices=[
                            ("exclusive", "Exclusive"),
                            ("inclusive", "Inclusive"),
                        ],
                        default="inclusive",
                        help_text="Exclusive requires site and group match; inclusive allows either.",
                        max_length=10,
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="modules",
                        to="app.application",
                    ),
                ),
            ],
            options={
                "verbose_name": "Module",
                "verbose_name_plural": "Modules",
                "db_table": "pages_module",
            },
        ),
    ]
