Files
vontor-cz/backend/thirdparty/gopay/migrations/0001_initial.py
Vontor Bruno 72155d4560 Refactor Zasilkovna client, update imports and cleanup
Refactored the Zasilkovna SOAP client to use a singleton pattern with caching and lazy loading, improving reliability and startup performance. Updated invoice PDF generation to import WeasyPrint lazily, preventing startup failures on systems missing dependencies. Cleaned up unused imports and code in several frontend components, removed unused state and variables, and adjusted Docker frontend port mapping. Also updated Django migration files to reflect a new generation timestamp.
2025-12-18 16:23:35 +01:00

64 lines
3.5 KiB
Python

# Generated by Django 5.2.7 on 2025-12-18 15:11
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='GoPayPayment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('gopay_id', models.CharField(db_index=True, max_length=64, unique=True)),
('order_number', models.CharField(blank=True, default='', max_length=128)),
('amount', models.BigIntegerField(help_text='Amount in minor units (e.g., CZK in haléř).')),
('currency', models.CharField(max_length=10)),
('status', models.CharField(db_index=True, default='', max_length=64)),
('preauthorized', models.BooleanField(default=False)),
('captured_amount', models.BigIntegerField(default=0)),
('request_payload', models.JSONField(blank=True, default=dict)),
('response_payload', models.JSONField(blank=True, default=dict)),
('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
('updated_at', models.DateTimeField(auto_now=True)),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='gopay_payments', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='GoPayRefund',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('gopay_refund_id', models.CharField(blank=True, default='', max_length=64)),
('amount', models.BigIntegerField(help_text='Amount in minor units.')),
('status', models.CharField(blank=True, default='', max_length=64)),
('payload', models.JSONField(blank=True, default=dict)),
('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
('payment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='refunds', to='gopay.gopaypayment')),
],
),
migrations.CreateModel(
name='GoPaySubscription',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('recurrence_id', models.CharField(blank=True, default='', max_length=64)),
('status', models.CharField(blank=True, default='', max_length=64)),
('interval', models.CharField(blank=True, default='', max_length=64)),
('next_payment_on', models.DateTimeField(blank=True, null=True)),
('payload', models.JSONField(blank=True, default=dict)),
('canceled', models.BooleanField(default=False)),
('canceled_at', models.DateTimeField(blank=True, null=True)),
('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
('parent_payment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subscriptions', to='gopay.gopaypayment')),
],
),
]