# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-02-02 05:34
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FlutterwaveCustomer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('phone', models.CharField(max_length=100, null=True)),
                ('customertoken', models.CharField(max_length=100, null=True)),
                ('account_id', models.CharField(max_length=100, null=True)),
                ('fw_customer_id', models.CharField(max_length=100, null=True)),
                ('deleted_at', models.DateTimeField(null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FlutterwavePayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entity_first_name', models.CharField(max_length=100, null=True)),
                ('entity_last_name', models.CharField(max_length=100, null=True)),
                ('entity_account_number', models.CharField(max_length=100, null=True)),
                ('entity_card6', models.CharField(max_length=100, null=True)),
                ('entity_card_last4', models.CharField(max_length=100, null=True)),
                ('flwRef', models.CharField(max_length=100, null=True)),
                ('txId', models.CharField(max_length=100, null=True)),
                ('txRef', models.CharField(max_length=100, null=True)),
                ('currency', models.CharField(max_length=4)),
                ('charged_amount', models.DecimalField(decimal_places=2, max_digits=18, null=True)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=18, null=True)),
                ('status', models.CharField(max_length=20)),
                ('ip_address', models.GenericIPAddressField()),
                ('course_id', models.CharField(max_length=50, null=True)),
                ('raw_json', models.CharField(max_length=5000, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MpesaTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('transaction_type', models.IntegerField(choices=[(1, 'Paybill'), (2, 'Till')])),
                ('first_name', models.CharField(max_length=50)),
                ('middle_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('billref_number', models.CharField(max_length=30)),
                ('phone', models.CharField(db_column='msisdn', max_length=30)),
                ('transaction_amount', models.DecimalField(decimal_places=2, max_digits=18, null=True)),
                ('transaction_id', models.CharField(max_length=30)),
                ('transaction_time', models.CharField(max_length=30)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='NiftyTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('business_short_code', models.CharField(max_length=50)),
                ('org_account_balance', models.DecimalField(decimal_places=2, max_digits=18, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('mpesa_transaction', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='payments.MpesaTransaction')),
            ],
        ),
        migrations.AddField(
            model_name='flutterwavepayment',
            name='mpesa_transaction',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='payments.MpesaTransaction'),
        ),
    ]
