# Generated by Django 5.2.8 on 2025-12-09 15:42

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="SeleniumScript",
            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)),
                ("name", models.CharField(max_length=100, unique=True)),
                ("description", models.TextField(blank=True)),
                ("start_url", models.URLField(blank=True)),
                (
                    "script",
                    models.TextField(
                        blank=True,
                        help_text="Inline Python to execute with the browser available as `browser`. Sigils are resolved before execution.",
                    ),
                ),
                (
                    "python_path",
                    models.CharField(
                        blank=True,
                        help_text="Dotted path to a Python callable that accepts the browser.",
                        max_length=255,
                    ),
                ),
            ],
            options={
                "verbose_name": "Selenium Script",
                "verbose_name_plural": "Selenium Scripts",
            },
        ),
        migrations.CreateModel(
            name="SeleniumBrowser",
            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)),
                ("name", models.CharField(max_length=100, unique=True)),
                (
                    "engine",
                    models.CharField(
                        choices=[("firefox", "Firefox")],
                        default="firefox",
                        max_length=20,
                    ),
                ),
                (
                    "mode",
                    models.CharField(
                        choices=[("headed", "Headed"), ("headless", "Headless")],
                        default="headed",
                        max_length=20,
                    ),
                ),
                (
                    "binary_path",
                    models.CharField(
                        blank=True,
                        help_text="Optional browser binary override.",
                        max_length=255,
                    ),
                ),
                ("is_default", models.BooleanField(default=False)),
            ],
            options={
                "verbose_name": "Selenium Browser",
                "verbose_name_plural": "Selenium Browsers",
                "constraints": [
                    models.UniqueConstraint(
                        condition=models.Q(("is_default", True)),
                        fields=("is_default",),
                        name="selenium_browser_single_default",
                    )
                ],
            },
        ),
    ]
