# Generated by Django 5.2.10 on 2026-01-27 17:44

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


class Migration(migrations.Migration):

    dependencies = [
        ("pages", "0006_sitebadge_favicon_media"),
        ("sites", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="ReferrerLanding",
            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)),
                (
                    "referrer_domain",
                    models.CharField(
                        help_text="Referrer domain to match, such as example.com",
                        max_length=255,
                    ),
                ),
                ("enabled", models.BooleanField(default=True)),
                ("description", models.TextField(blank=True)),
                (
                    "landing",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="referrer_landings",
                        to="pages.landing",
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="referrer_landings",
                        to="sites.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "Referrer Landing",
                "verbose_name_plural": "Referrer Landings",
                "unique_together": {("site", "referrer_domain")},
            },
        ),
    ]
