# Generated by Django 4.2.27 on 2026-01-22 10:48 import apps.transaction.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields import utils.validators class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("course", "0001_initial"), ] operations = [ migrations.CreateModel( name="TransactionParticipant", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "payment_method", models.CharField( choices=[ ("receipt", "Receipt"), ("free", "Free"), ("Payment_Gateway", "Payment Gateway"), ], default="Payment_Gateway", max_length=20, verbose_name="Transaction Payment Method", ), ), ( "price", models.DecimalField( decimal_places=2, default=0.0, max_digits=10, verbose_name="Transaction Price", ), ), ( "status", models.CharField( choices=[ ("pending", "Pending"), ("waiting_approval", "Waiting for Approval"), ("success", "Success"), ("failed", "Failed"), ], default="pending", max_length=20, verbose_name="Transaction Status", ), ), ( "created_at", models.DateTimeField(auto_now_add=True, verbose_name="Created at"), ), ( "updated_at", models.DateTimeField(auto_now=True, verbose_name="Updated at"), ), ("is_deleted", models.BooleanField(default=False)), ( "course", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="course_transactions", to="course.course", ), ), ( "user", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="transactions", to=settings.AUTH_USER_MODEL, ), ), ], ), migrations.CreateModel( name="TransactionReceipt", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "file", models.FileField( help_text="Upload payment receipt image or document", upload_to=apps.transaction.models.receipt_file_upload_to, verbose_name="Receipt File", ), ), ( "uploaded_at", models.DateTimeField(auto_now_add=True, verbose_name="Uploaded At"), ), ( "description", models.TextField( blank=True, help_text="Optional description or notes about the receipt", null=True, verbose_name="Description", ), ), ( "transaction", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="receipts", to="transaction.transactionparticipant", verbose_name="Transaction", ), ), ], options={ "verbose_name": "Transaction Receipt", "verbose_name_plural": "Transaction Receipts", "ordering": ["-uploaded_at"], }, ), migrations.CreateModel( name="ParticipantInfo", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "fullname", models.CharField( help_text="Enter the full name of the user.", max_length=255, verbose_name="Full Name", ), ), ( "email", models.EmailField( help_text="Enter the user's email address.", max_length=254, verbose_name="Email Address", ), ), ( "phone_number", phonenumber_field.modelfields.PhoneNumberField( blank=True, max_length=128, null=True, region=None, validators=[utils.validators.validate_possible_number], verbose_name="phone", ), ), ( "gender", models.CharField( blank=True, choices=[("male", "Male"), ("female", "Female")], help_text="Select the user's gender.", max_length=20, null=True, verbose_name="Gender", ), ), ( "birthdate", models.DateField(blank=True, null=True, verbose_name="birthdate"), ), ( "transaction_participant", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="participant_infos", to="transaction.transactionparticipant", verbose_name="Transaction Participant", ), ), ], ), ]