# Generated by Django 6.0.3 on 2026-04-05 07:27

import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('withdrawals', '0002_withdrawaldeductionconfig_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BankAccount',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('account_holder_name', models.CharField(max_length=200)),
                ('account_number', models.CharField(max_length=30)),
                ('ifsc_code', models.CharField(max_length=20)),
                ('bank_name', models.CharField(max_length=200)),
                ('is_verified', models.BooleanField(default=False)),
                ('is_primary', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bank_accounts', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-is_primary', '-created_at'],
            },
        ),
        migrations.AddField(
            model_name='withdrawalrequest',
            name='bank_account',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='withdrawals', to='withdrawals.bankaccount'),
        ),
        migrations.CreateModel(
            name='BankAccountOTP',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('otp_code', models.CharField(max_length=10)),
                ('expires_at', models.DateTimeField()),
                ('is_used', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('bank_account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='otps', to='withdrawals.bankaccount')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
