# Generated by Django 3.1.4 on 2020-12-06 13:35

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Bank",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("Waiting", "Waiting"),
                            ("Redirect to bank", "Redirect To Bank"),
                            ("Return from bank", "Return From Bank"),
                            ("Cancel by user", "Cancel By User"),
                            ("Expire gateway token", "Expire Gateway Token"),
                            ("Complete", "Complete"),
                        ],
                        max_length=50,
                        verbose_name="Status",
                    ),
                ),
                (
                    "bank_type",
                    models.CharField(
                        choices=[("BMI", "BMI"), ("ZARINPAL", "Zarinpal")],
                        max_length=50,
                        verbose_name="Bank",
                    ),
                ),
                (
                    "tracking_code",
                    models.CharField(max_length=255, verbose_name="Tracking code"),
                ),
                ("amount", models.CharField(max_length=10, verbose_name="Amount")),
                (
                    "reference_number",
                    models.CharField(max_length=255, unique=True, verbose_name="Reference number"),
                ),
                (
                    "response_result",
                    models.TextField(blank=True, null=True, verbose_name="Bank result"),
                ),
                ("callback_url", models.TextField(verbose_name="Callback url")),
                (
                    "extra_information",
                    models.TextField(blank=True, null=True, verbose_name="Extra information"),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("update_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Bank gateway",
                "verbose_name_plural": "Bank gateways",
            },
        ),
    ]
