# Generated by Django 5.2.7 on 2026-03-16 01:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('account', '0033_user_dob_user_is_dob_verified'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserAPIKey',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mojo_secrets', models.TextField(blank=True, default=None, null=True)),
                ('jti', models.CharField(db_index=True, max_length=64, unique=True)),
                ('label', models.CharField(blank=True, default='', max_length=200)),
                ('allowed_ips', models.JSONField(blank=True, default=list)),
                ('expires', models.DateTimeField(db_index=True)),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('last_used', models.DateTimeField(default=None, null=True)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(auto_now=True, db_index=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='api_tokens', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
            bases=(models.Model, mojo.models.rest.MojoModel),
        ),
    ]
