# Generated by Django 3.1.4 on 2021-01-06 10:06

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('account', '0001_initial'),
        ('merchant', '0003_auto_20210105_1955'),
    ]

    operations = [
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=18)),
                ('currency', models.CharField(choices=[('NGN', 'NGN'), ('GHS', 'GHS'), ('KES', 'KES'), ('GBP', 'GBP')], max_length=5)),
                ('transaction_id', models.CharField(default='', editable=False, max_length=128)),
                ('transaction_type', models.CharField(choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=10)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('beneficary', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'transaction',
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=18)),
                ('currency', models.CharField(choices=[('NGN', 'NGN'), ('GHS', 'GHS'), ('KES', 'KES'), ('GBP', 'GBP'), ('USD', 'USD')], max_length=5)),
                ('status', models.CharField(max_length=128)),
                ('flw_ref', models.CharField(max_length=128)),
                ('transaction_id', models.CharField(max_length=128)),
                ('tx_ref', models.CharField(max_length=128)),
                ('payment_type', models.CharField(choices=[('approval', 'APPROVAL'), ('sale', 'SALE')], max_length=64)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.customer')),
                ('merchant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.merchant')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merchant.order')),
                ('shop', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merchant.shop')),
            ],
            options={
                'db_table': 'payment',
            },
        ),
    ]
