# Generated by Django 6.0.1 on 2026-04-10 06:09

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


class Migration(migrations.Migration):

    dependencies = [
        ('tienda', '0004_product_stock_stockreservation_stockreservationitem'),
    ]

    operations = [
        migrations.CreateModel(
            name='SavedPaymentMethod',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method_type', models.CharField(choices=[('card', 'Tarjeta'), ('paypal', 'PayPal')], max_length=10)),
                ('label', models.CharField(max_length=200, verbose_name='Etiqueta')),
                ('stripe_customer_id', models.CharField(blank=True, default='', max_length=100)),
                ('stripe_payment_method_id', models.CharField(blank=True, default='', max_length=100)),
                ('paypal_email', models.CharField(blank=True, default='', max_length=254)),
                ('paypal_payer_id', models.CharField(blank=True, default='', max_length=100)),
                ('is_default', models.BooleanField(default=False, verbose_name='Predeterminado')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_methods', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Método de pago guardado',
                'verbose_name_plural': 'Métodos de pago guardados',
                'ordering': ['-is_default', '-created_at'],
            },
        ),
    ]
