# Generated by Django 5.2.10 on 2026-02-02 03:20

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("links", "0007_update_reference_mysql_to_sqlite"),
    ]

    operations = [
        migrations.CreateModel(
            name="ShortURL",
            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)),
                (
                    "slug",
                    models.SlugField(
                        blank=True,
                        help_text="Short, persistent slug used for shared links.",
                        max_length=32,
                        unique=True,
                    ),
                ),
                (
                    "original_url",
                    models.CharField(
                        help_text="Original URL used when the short link was created.",
                        max_length=500,
                    ),
                ),
                (
                    "target_url",
                    models.CharField(
                        help_text="Destination URL or absolute path.", max_length=500
                    ),
                ),
                ("created_on", models.DateTimeField(auto_now_add=True)),
                ("updated_on", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Short URL",
                "verbose_name_plural": "Short URLs",
                "ordering": ("slug",),
            },
        ),
    ]
