fix error in gitignore

This commit is contained in:
2026-09-24 12:32:59 +03:30
commit 86c117ee2a
165 changed files with 5963 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# Generated by Django 5.2.17 on 2026-09-15 09:29
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('orders', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Payment',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('amount', models.DecimalField(decimal_places=2, max_digits=18)),
('currency', models.CharField(default='IRR', max_length=8)),
('gateway', models.CharField(max_length=40)),
('transaction_id', models.CharField(max_length=120)),
('authority', models.CharField(blank=True, max_length=120)),
('status', models.CharField(choices=[('pending', 'Pending'), ('success', 'Success'), ('failed', 'Failed'), ('cancelled', 'Cancelled')], default='pending', max_length=12)),
('request_time', models.DateTimeField(blank=True, null=True)),
('callback_time', models.DateTimeField(blank=True, null=True)),
('verification_time', models.DateTimeField(blank=True, null=True)),
('error', models.TextField(blank=True)),
('order', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='payments', to='orders.processingorder')),
],
options={
'constraints': [models.UniqueConstraint(fields=('gateway', 'transaction_id'), name='uniq_gateway_transaction')],
},
),
]
@@ -0,0 +1,30 @@
# Generated by Django 5.2.17 on 2026-09-15 11:56
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0001_initial'),
('payments', '0001_initial'),
('reservations', '0002_reservation_approved_at_reservation_approved_by_and_more'),
]
operations = [
migrations.AddField(
model_name='payment',
name='reservation',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='payments', to='reservations.reservation'),
),
migrations.AlterField(
model_name='payment',
name='order',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='payments', to='orders.processingorder'),
),
migrations.AddConstraint(
model_name='payment',
constraint=models.CheckConstraint(condition=models.Q(('order__isnull', False), ('reservation__isnull', False), _connector='OR'), name='payment_has_target'),
),
]