# Generated by Django 5.2.7 on 2026-06-30 00:15 import django.core.validators import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=160)), ('slug', models.SlugField(blank=True, max_length=180, unique=True)), ('short_description', models.CharField(max_length=240)), ('description', models.TextField()), ('price_from', models.DecimalField(decimal_places=2, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), ('delivery_time', models.CharField(default='A convenir', max_length=80)), ('is_featured', models.BooleanField(default=False)), ('is_active', models.BooleanField(default=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': 'producto/servicio', 'verbose_name_plural': 'productos y servicios', 'ordering': ['category__sort_order', 'name'], }, ), migrations.CreateModel( name='ProductCategory', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=120, unique=True)), ('slug', models.SlugField(blank=True, max_length=140, unique=True)), ('description', models.TextField(blank=True)), ('accent', models.CharField(default='#00D1FF', max_length=20)), ('icon', models.CharField(default='bi-cpu', max_length=40)), ('is_active', models.BooleanField(default=True)), ('sort_order', models.PositiveIntegerField(default=0)), ], options={ 'verbose_name': 'categoría de producto', 'verbose_name_plural': 'categorías de productos', 'ordering': ['sort_order', 'name'], }, ), migrations.CreateModel( name='PaymentConfirmation', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('customer_name', models.CharField(max_length=140)), ('customer_phone', models.CharField(max_length=40)), ('customer_email', models.EmailField(blank=True, max_length=254)), ('amount', models.DecimalField(decimal_places=2, max_digits=10, validators=[django.core.validators.MinValueValidator(1)])), ('method', models.CharField(choices=[('transfermovil', 'Transfermóvil'), ('enzona', 'Enzona'), ('qr', 'Código QR'), ('transferencia', 'Transferencia bancaria')], max_length=30)), ('reference', models.CharField(max_length=120)), ('note', models.TextField(blank=True)), ('receipt', models.FileField(blank=True, upload_to='payment_receipts/')), ('status', models.CharField(choices=[('pendiente', 'Pendiente'), ('aprobado', 'Aprobado'), ('rechazado', 'Rechazado')], default='pendiente', max_length=20)), ('admin_note', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('reviewed_at', models.DateTimeField(blank=True, null=True)), ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payment_confirmations', to='core.product')), ], options={ 'verbose_name': 'confirmación de pago', 'verbose_name_plural': 'confirmaciones de pago', 'ordering': ['-created_at'], }, ), migrations.AddField( model_name='product', name='category', field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='products', to='core.productcategory'), ), ]