# Generated by Django 5.1.5 on 2025-12-31 03:16

import datetime
import uuid

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


class Migration(migrations.Migration):
    dependencies = [
        ("django_jwt_2fa", "0001_initial"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveField(
            model_name="emailotp",
            name="code_hash",
        ),
        migrations.RemoveField(
            model_name="emailotp",
            name="user_id",
        ),
        migrations.AddField(
            model_name="emailotp",
            name="expires_at",
            field=models.DateTimeField(
                default=datetime.datetime(
                    2025, 12, 31, 3, 16, 36, 594701, tzinfo=datetime.timezone.utc
                )
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="emailotp",
            name="otp",
            field=models.CharField(default=123456, max_length=6),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="emailotp",
            name="user",
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="email_otps",
                to=settings.AUTH_USER_MODEL,
            ),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name="emailotp",
            name="id",
            field=models.UUIDField(
                default=uuid.uuid4, editable=False, primary_key=True, serialize=False
            ),
        ),
        migrations.AddIndex(
            model_name="emailotp",
            index=models.Index(
                fields=["user", "otp"], name="django_jwt__user_id_aa3abe_idx"
            ),
        ),
    ]
