# Generated by Django 5.2 on 2025-08-01 00:00
from django.db import migrations, models
import uuid
import django.core.validators

class Migration(migrations.Migration):

    dependencies = [
        ('api', '0080_userphonenumber_last_verification_attempt'),
    ]

    operations = [
        migrations.CreateModel(
            name='LinkShortener',
            fields=[
                ('id', models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)),
                ('code', models.CharField(max_length=32, unique=True, blank=True,
                    validators=[django.core.validators.RegexValidator(regex='^[A-Za-z]{3,}$', message='Code must be at least three alphabetic characters.')],
                    help_text='Short code used in the redirect URL.')),
                ('url', models.URLField(help_text='Destination URL')),
                ('hits', models.PositiveIntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]

