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

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Reference",
            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)),
                (
                    "content_type",
                    models.CharField(
                        choices=[("text", "Text"), ("image", "Image")],
                        default="text",
                        max_length=5,
                    ),
                ),
                (
                    "alt_text",
                    models.CharField(max_length=500, verbose_name="Title / Alt Text"),
                ),
                ("value", models.TextField(blank=True)),
                ("file", models.FileField(blank=True, upload_to="refs/")),
                ("image", models.ImageField(blank=True, upload_to="refs/qr/")),
                ("uses", models.PositiveIntegerField(default=0)),
                ("method", models.CharField(default="qr", max_length=50)),
                (
                    "validated_url_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="Timestamp of the last URL validation check.",
                        null=True,
                        verbose_name="Validated URL",
                    ),
                ),
                (
                    "validation_status",
                    models.IntegerField(
                        blank=True,
                        help_text="HTTP status code from the last URL validation attempt.",
                        null=True,
                        verbose_name="Validation Status",
                    ),
                ),
                (
                    "include_in_footer",
                    models.BooleanField(
                        default=False, verbose_name="Include in Footer"
                    ),
                ),
                (
                    "show_in_header",
                    models.BooleanField(default=False, verbose_name="Show in Header"),
                ),
                (
                    "footer_visibility",
                    models.CharField(
                        choices=[
                            ("public", "Public"),
                            ("private", "Private"),
                            ("staff", "Staff"),
                        ],
                        default="public",
                        max_length=7,
                        verbose_name="Footer Visibility",
                    ),
                ),
                (
                    "transaction_uuid",
                    models.UUIDField(
                        db_index=True,
                        default=uuid.uuid4,
                        verbose_name="Transaction UUID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
            ],
            options={
                "verbose_name": "Reference",
                "verbose_name_plural": "References",
                "db_table": "core_reference",
            },
        ),
    ]
