# Generated by Django 5.2.8 on 2025-12-05 17:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('billing', '0005_credittransaction_reference_id_invoice_billing_email_and_more'),
        ('igny8_core_auth', '0004_add_invoice_payment_models'),
    ]

    operations = [
        migrations.CreateModel(
            name='AccountPaymentMethod',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('stripe', 'Stripe'), ('paypal', 'PayPal'), ('bank_transfer', 'Bank Transfer'), ('local_wallet', 'Local Wallet')], db_index=True, max_length=50)),
                ('display_name', models.CharField(default='', help_text='User-visible label', max_length=100)),
                ('is_default', models.BooleanField(db_index=True, default=False)),
                ('is_enabled', models.BooleanField(db_index=True, default=True)),
                ('is_verified', models.BooleanField(db_index=True, default=False)),
                ('country_code', models.CharField(blank=True, default='', help_text='ISO-2 country code (optional)', max_length=2)),
                ('instructions', models.TextField(blank=True, default='')),
                ('metadata', models.JSONField(blank=True, default=dict, help_text='Provider references or display metadata')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('account', models.ForeignKey(db_column='tenant_id', on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.account')),
            ],
            options={
                'db_table': 'igny8_account_payment_methods',
                'ordering': ['-is_default', 'display_name', 'id'],
                'indexes': [models.Index(fields=['account', 'is_default'], name='igny8_accou_tenant__30d459_idx'), models.Index(fields=['account', 'type'], name='igny8_accou_tenant__4cc9c7_idx')],
                'unique_together': {('account', 'display_name')},
            },
        ),
    ]
