# Generated by Django 5.2.11 on 2026-05-03 03:49

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


class Migration(migrations.Migration):

    dependencies = [
        ('companies', '0006_companysettings_auto_print_on_sale_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SuperAdmin2FA',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_enabled', models.BooleanField(default=False, help_text='Enable 2FA enforcement for this superuser on every login.')),
                ('method', models.CharField(choices=[('email', 'Email OTP (6-digit code sent to your email)'), ('totp', 'Google Authenticator / TOTP App')], default='email', help_text='Which second factor to use.', max_length=10)),
                ('totp_secret', models.CharField(blank=True, editable=False, help_text='Auto-generated Base32 TOTP secret (do not edit manually).', max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(help_text='Must be a superuser account.', limit_choices_to={'is_superuser': True}, on_delete=django.db.models.deletion.CASCADE, related_name='superadmin_2fa', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Superadmin 2FA Config',
                'verbose_name_plural': 'Superadmin 2FA Configs',
            },
        ),
    ]
