# Generated by Django 4.2.16 on 2025-08-14 05:52

from django.db import migrations, models
import django.db.models.deletion
import zango.apps.appauth.schema


class Migration(migrations.Migration):

    dependencies = [
        ('appauth', '0007_appuserauthtoken'),
    ]

    operations = [
        migrations.AddField(
            model_name='appusermodel',
            name='auth_config',
            field=models.JSONField(default=zango.apps.appauth.schema.get_default_app_user_auth_config),
        ),
        migrations.AddField(
            model_name='userrolemodel',
            name='auth_config',
            field=models.JSONField(default=zango.apps.appauth.schema.get_default_user_role_auth_config),
        ),
        migrations.CreateModel(
            name='OTPCode',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.CharField(blank=True, editable=False, max_length=255)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('modified_by', models.CharField(blank=True, editable=False, max_length=255)),
                ('code', models.CharField(max_length=128)),
                ('otp_type', models.CharField(choices=[('two_factor_auth', 'Two-Factor Authentication'), ('login_code', 'Login Code')], max_length=50)),
                ('is_used', models.BooleanField(default=False)),
                ('expires_at', models.DateTimeField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='otp_codes', to='appauth.appusermodel')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
