# Generated by Django 3.2.7 on 2021-09-05 16:20

import uuid

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("economy", "0023_fix_coinify_model_ordering"),
    ]

    operations = [
        migrations.CreateModel(
            name="EpayTransaction",
            fields=[
                (
                    "uuid",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("updated", models.DateTimeField(auto_now=True)),
                (
                    "merchant_id",
                    models.IntegerField(
                        help_text="ePay merchant number for this transaction."
                    ),
                ),
                (
                    "transaction_id",
                    models.IntegerField(help_text="ePays internal transaction ID."),
                ),
                (
                    "order_id",
                    models.IntegerField(
                        help_text="The BornHack order ID for this ePay transaction."
                    ),
                ),
                (
                    "currency",
                    models.CharField(
                        help_text="The currency of this payment.", max_length=3
                    ),
                ),
                (
                    "auth_date",
                    models.DateTimeField(
                        help_text="The date this payment was authorised by the user."
                    ),
                ),
                (
                    "auth_amount",
                    models.DecimalField(
                        decimal_places=2,
                        help_text="The amount that was authorised by the user.",
                        max_digits=12,
                    ),
                ),
                (
                    "captured_date",
                    models.DateTimeField(
                        help_text="The date this payment was captured."
                    ),
                ),
                (
                    "captured_amount",
                    models.DecimalField(
                        decimal_places=2,
                        help_text="The amount that was captured.",
                        max_digits=12,
                    ),
                ),
                (
                    "card_type",
                    models.TextField(help_text="The card type used for this payment."),
                ),
                (
                    "description",
                    models.TextField(help_text="The description of this payment."),
                ),
                (
                    "transaction_fee",
                    models.DecimalField(
                        decimal_places=2,
                        help_text="The transaction fee for this payment.",
                        max_digits=12,
                    ),
                ),
            ],
            options={
                "ordering": ["-auth_date"],
                "get_latest_by": ["auth_date"],
            },
        ),
    ]
