17 migrations.CreateModel(
18 name=
'PaymentRequest',
20 (
'id', models.UUIDField(default=uuid.uuid4, editable=
False, primary_key=
True, serialize=
False)),
21 (
'user_token', models.CharField(help_text=
'Token de autenticación del usuario', max_length=255)),
22 (
'preference_id', models.CharField(blank=
True, help_text=
'ID de la preferencia en Mercado Pago', max_length=255, null=
True)),
23 (
'init_point', models.URLField(blank=
True, help_text=
'URL para redirigir al usuario para el pago', null=
True)),
24 (
'status', models.CharField(default=
'pending', help_text=
'Estado del pago', max_length=50)),
25 (
'total_amount', models.DecimalField(blank=
True, decimal_places=2, help_text=
'Monto total del pago', max_digits=10, null=
True)),
26 (
'cart_data', models.JSONField(blank=
True, help_text=
'Datos del carrito del usuario', null=
True)),
27 (
'created_at', models.DateTimeField(default=django.utils.timezone.now, help_text=
'Fecha de creación')),
28 (
'updated_at', models.DateTimeField(auto_now=
True, help_text=
'Fecha de actualización')),
31 'verbose_name':
'Solicitud de pago',
32 'verbose_name_plural':
'Solicitudes de pago',
33 'ordering': [
'-created_at'],
36 migrations.CreateModel(
37 name=
'PaymentNotification',
39 (
'id', models.UUIDField(default=uuid.uuid4, editable=
False, primary_key=
True, serialize=
False)),
40 (
'payment_id', models.CharField(help_text=
'ID del pago en Mercado Pago', max_length=255)),
41 (
'topic', models.CharField(help_text=
'Tipo de notificación', max_length=50)),
42 (
'raw_data', models.JSONField(help_text=
'Datos completos de la notificación')),
43 (
'processed', models.BooleanField(default=
False, help_text=
'Indica si la notificación ya fue procesada')),
44 (
'created_at', models.DateTimeField(default=django.utils.timezone.now, help_text=
'Fecha de recepción')),
45 (
'payment_request', models.ForeignKey(blank=
True, null=
True, on_delete=django.db.models.deletion.CASCADE, related_name=
'notifications', to=
'payment_service.paymentrequest')),
48 'verbose_name':
'Notificación de pago',
49 'verbose_name_plural':
'Notificaciones de pago',
50 'ordering': [
'-created_at'],