100 lines
3.0 KiB
Python
100 lines
3.0 KiB
Python
# Generated by Django 5.0.3 on 2024-03-24 19:19
|
|
|
|
import tpv.models
|
|
import uuid
|
|
from decimal import Decimal
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = []
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="PaymentTransaction",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"hash",
|
|
models.UUIDField(
|
|
db_index=True, default=uuid.uuid4, verbose_name="Hash"
|
|
),
|
|
),
|
|
(
|
|
"status",
|
|
models.CharField(
|
|
choices=[
|
|
("PAI", "Pagado"),
|
|
("PEN", "Pendiente"),
|
|
("ERR", "Error"),
|
|
],
|
|
default="PEN",
|
|
max_length=3,
|
|
verbose_name="Estado",
|
|
),
|
|
),
|
|
(
|
|
"amount",
|
|
models.DecimalField(
|
|
decimal_places=2,
|
|
default=Decimal("0"),
|
|
max_digits=8,
|
|
verbose_name="Cantidad a pagar",
|
|
),
|
|
),
|
|
(
|
|
"creation_date",
|
|
models.DateTimeField(
|
|
auto_now_add=True, verbose_name="Fecha de creación"
|
|
),
|
|
),
|
|
(
|
|
"last_modification_date",
|
|
models.DateTimeField(
|
|
auto_now=True, verbose_name="Fecha de última modificación"
|
|
),
|
|
),
|
|
(
|
|
"contact_email",
|
|
models.EmailField(
|
|
blank=True,
|
|
max_length=254,
|
|
null=True,
|
|
verbose_name="Email de contacto",
|
|
),
|
|
),
|
|
(
|
|
"observations",
|
|
models.CharField(
|
|
blank=True,
|
|
default="",
|
|
max_length=255,
|
|
null=True,
|
|
verbose_name="Observaciones",
|
|
),
|
|
),
|
|
(
|
|
"metadata",
|
|
models.JSONField(
|
|
default=tpv.models.set_default_metadata, verbose_name="Metadata"
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Pago de pedido en Redsys",
|
|
"verbose_name_plural": "Pagos de pedidos en Redsys",
|
|
},
|
|
),
|
|
]
|