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

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Landing",
            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(max_length=200)),
                ("label", models.CharField(max_length=100)),
                ("enabled", models.BooleanField(default=True)),
                ("track_leads", models.BooleanField(default=False)),
                ("description", models.TextField(blank=True)),
                (
                    "validation_status",
                    models.IntegerField(
                        blank=True,
                        help_text="HTTP status code from the last landing validation attempt.",
                        null=True,
                        verbose_name="Validation Status",
                    ),
                ),
                (
                    "validated_url_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="Timestamp of the last landing validation check.",
                        null=True,
                        verbose_name="Validated URL",
                    ),
                ),
            ],
            options={
                "verbose_name": "Landing",
                "verbose_name_plural": "Landings",
            },
        ),
        migrations.CreateModel(
            name="LandingLead",
            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.TextField(blank=True)),
                ("referer", models.TextField(blank=True)),
                ("user_agent", models.TextField(blank=True)),
                (
                    "ip_address",
                    models.CharField(
                        blank=True,
                        max_length=45,
                        validators=[django.core.validators.validate_ipv46_address],
                    ),
                ),
                ("created_on", models.DateTimeField(auto_now_add=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("open", "Open"),
                            ("assigned", "Assigned"),
                            ("closed", "Closed"),
                        ],
                        default="open",
                        max_length=20,
                    ),
                ),
            ],
            options={
                "verbose_name": "Landing Lead",
                "verbose_name_plural": "Landing Leads",
            },
        ),
        migrations.CreateModel(
            name="SiteBadge",
            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)),
                ("badge_color", models.CharField(default="#28a745", max_length=7)),
                ("favicon", models.ImageField(blank=True, upload_to="sites/favicons/")),
            ],
            options={
                "verbose_name": "Site Badge",
                "verbose_name_plural": "Site Badges",
            },
        ),
        migrations.CreateModel(
            name="SiteTemplate",
            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)),
                (
                    "primary_color",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "primary_color_emphasis",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "accent_color",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "accent_color_emphasis",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "support_color",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "support_color_emphasis",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
                (
                    "support_text_color",
                    models.CharField(
                        max_length=7,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Enter a valid hex color code (e.g. #0d6efd).",
                                regex="^#(?:[0-9a-fA-F]{3}){1,2}$",
                            )
                        ],
                    ),
                ),
            ],
            options={
                "verbose_name": "Site Branding",
                "verbose_name_plural": "Site Brandings",
                "ordering": ("name",),
            },
        ),
        migrations.CreateModel(
            name="UserStory",
            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)),
                ("referer", models.TextField(blank=True)),
                ("user_agent", models.TextField(blank=True)),
                (
                    "ip_address",
                    models.CharField(
                        blank=True,
                        max_length=45,
                        validators=[django.core.validators.validate_ipv46_address],
                    ),
                ),
                ("created_on", models.DateTimeField(auto_now_add=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("open", "Open"),
                            ("assigned", "Assigned"),
                            ("closed", "Closed"),
                        ],
                        default="open",
                        max_length=20,
                    ),
                ),
                ("path", models.CharField(max_length=500)),
                ("name", models.CharField(blank=True, max_length=40)),
                (
                    "rating",
                    models.PositiveSmallIntegerField(
                        help_text="Rate your experience from 1 (lowest) to 5 (highest).",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(5),
                        ],
                    ),
                ),
                (
                    "comments",
                    models.TextField(
                        help_text="Share more about your experience.",
                        validators=[django.core.validators.MaxLengthValidator(400)],
                    ),
                ),
                ("submitted_at", models.DateTimeField(auto_now_add=True)),
                (
                    "github_issue_number",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="Number of the GitHub issue created for this feedback.",
                        null=True,
                    ),
                ),
                (
                    "github_issue_url",
                    models.URLField(
                        blank=True,
                        help_text="Link to the GitHub issue created for this feedback.",
                    ),
                ),
                (
                    "language_code",
                    models.CharField(
                        blank=True,
                        help_text="Language selected when the feedback was submitted.",
                        max_length=15,
                    ),
                ),
            ],
            options={
                "verbose_name": "User Story",
                "verbose_name_plural": "User Stories",
                "ordering": ["-submitted_at"],
            },
        ),
        migrations.CreateModel(
            name="ViewHistory",
            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(max_length=2048)),
                ("method", models.CharField(max_length=10)),
                ("status_code", models.PositiveSmallIntegerField()),
                ("status_text", models.CharField(blank=True, max_length=100)),
                ("error_message", models.TextField(blank=True)),
                ("view_name", models.CharField(blank=True, max_length=200)),
                ("visited_at", models.DateTimeField(auto_now_add=True)),
            ],
            options={
                "verbose_name": "View History",
                "verbose_name_plural": "View Histories",
                "ordering": ["-visited_at"],
            },
        ),
    ]
