# Generated by Django 5.2.7 on 2026-01-24 04:34

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0018_remove_appsetting_annual_fee_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Amount')),
                ('transaction_type', models.CharField(choices=[('PAYMENT', 'Payment'), ('REFUND', 'Refund')], default='PAYMENT', max_length=20)),
                ('status', models.CharField(choices=[('PENDING', 'Pending'), ('COMPLETED', 'Completed'), ('FAILED', 'Failed'), ('CANCELLED', 'Cancelled')], default='COMPLETED', max_length=20)),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('payment_method', models.CharField(blank=True, max_length=100, verbose_name='Payment Method')),
                ('reference_number', models.CharField(blank=True, max_length=100, verbose_name='Reference Number')),
                ('receipt_number', models.CharField(blank=True, max_length=20, unique=True, verbose_name='Receipt Number')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Transaction',
                'verbose_name_plural': 'Transactions',
                'ordering': ['-created_at'],
            },
        ),
    ]
