# Generated by Django 2.2.6 on 2019-12-18 12:10

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sender', '0001_initial'),
        ('beneficiary', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('10000', 'CREATED'), ('20000', 'CONFIRMED'), ('20110', 'CONFIRMED-UNDER-REVIEW-SLS'), ('20150', 'CONFIRMED-WAITING-FOR-PICKUP'), ('30000', 'REJECTED'), ('30110', 'REJECTED-SLS-SENDER'), ('30120', 'REJECTED-SLS-BENEFICIARY'), ('30200', 'REJECTED-INVALID-BENEFICIARY'), ('30201', 'REJECTED-BARRED-BENEFICIARY'), ('30210', 'REJECTED-INVALID-BENEFICIARY-DETAILS'), ('30305', 'REJECTED-LIMITATIONS-ON-TRANSACTION-VALUE'), ('30310', 'REJECTED-LIMITATIONS-ON-SENDER-VALUE'), ('30320', 'REJECTED-LIMITATIONS-ON-BENEFICIARY-VALUE'), ('30330', 'REJECTED-LIMITATIONS-ON-ACCOUNT-VALUE'), ('30350', 'REJECTED-LIMITATIONS-ON-SENDER-QUANTITY'), ('30360', 'REJECTED-LIMITATIONS-ON-BENEFICIARY-QUANTITY'), ('30370', 'REJECTED-LIMITATIONS-ON-ACCOUNT-QUANTITY'), ('30400', 'REJECTED-PAYER-CURRENTLY-UNAVAILABLE'), ('30500', 'REJECTED-INSUFFICIENT-BALANCE'), ('40000', 'CANCELLED'), ('50000', 'SUBMITTED'), ('60000', 'AVAILABLE'), ('70000', 'COMPLETED'), ('80000', 'REVERSED'), ('90000', 'DECLINED'), ('90110', 'DECLINED-SLS-SENDER'), ('90120', 'DECLINED-SLS-BENEFICIARY'), ('90200', 'DECLINED-INVALID-BENEFICIARY'), ('90201', 'DECLINED-BARRED-BENEFICIARY'), ('90202', 'DECLINED-UNSUPPORTED-BENEFICIARY'), ('90210', 'DECLINED-INVALID-BENEFICIARY-DETAILS'), ('90305', 'DECLINED-LIMITATIONS-ON-TRANSACTION-VALUE'), ('90310', 'DECLINED-LIMITATIONS-ON-SENDER-VALUE'), ('90320', 'DECLINED-LIMITATIONS-ON-BENEFICIARY-VALUE'), ('90330', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE'), ('90331', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-DAILY'), ('90332', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-WEEKLY'), ('90333', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-MONTHLY'), ('90334', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-YEARLY'), ('90350', 'DECLINED-LIMITATIONS-ON-SENDER-QUANTITY'), ('90360', 'DECLINED-LIMITATIONS-ON-BENEFICIARY-QUANTITY'), ('90370', 'DECLINED-LIMITATIONS-ON-ACCOUNT-QUANTITY'), ('90400', 'DECLINED-PAYER-CURRENTLY-UNAVAILABLE')], default='10000', max_length=50, verbose_name='Transaction status code')),
                ('status_message', models.CharField(choices=[('10000', 'CREATED'), ('20000', 'CONFIRMED'), ('20110', 'CONFIRMED-UNDER-REVIEW-SLS'), ('20150', 'CONFIRMED-WAITING-FOR-PICKUP'), ('30000', 'REJECTED'), ('30110', 'REJECTED-SLS-SENDER'), ('30120', 'REJECTED-SLS-BENEFICIARY'), ('30200', 'REJECTED-INVALID-BENEFICIARY'), ('30201', 'REJECTED-BARRED-BENEFICIARY'), ('30210', 'REJECTED-INVALID-BENEFICIARY-DETAILS'), ('30305', 'REJECTED-LIMITATIONS-ON-TRANSACTION-VALUE'), ('30310', 'REJECTED-LIMITATIONS-ON-SENDER-VALUE'), ('30320', 'REJECTED-LIMITATIONS-ON-BENEFICIARY-VALUE'), ('30330', 'REJECTED-LIMITATIONS-ON-ACCOUNT-VALUE'), ('30350', 'REJECTED-LIMITATIONS-ON-SENDER-QUANTITY'), ('30360', 'REJECTED-LIMITATIONS-ON-BENEFICIARY-QUANTITY'), ('30370', 'REJECTED-LIMITATIONS-ON-ACCOUNT-QUANTITY'), ('30400', 'REJECTED-PAYER-CURRENTLY-UNAVAILABLE'), ('30500', 'REJECTED-INSUFFICIENT-BALANCE'), ('40000', 'CANCELLED'), ('50000', 'SUBMITTED'), ('60000', 'AVAILABLE'), ('70000', 'COMPLETED'), ('80000', 'REVERSED'), ('90000', 'DECLINED'), ('90110', 'DECLINED-SLS-SENDER'), ('90120', 'DECLINED-SLS-BENEFICIARY'), ('90200', 'DECLINED-INVALID-BENEFICIARY'), ('90201', 'DECLINED-BARRED-BENEFICIARY'), ('90202', 'DECLINED-UNSUPPORTED-BENEFICIARY'), ('90210', 'DECLINED-INVALID-BENEFICIARY-DETAILS'), ('90305', 'DECLINED-LIMITATIONS-ON-TRANSACTION-VALUE'), ('90310', 'DECLINED-LIMITATIONS-ON-SENDER-VALUE'), ('90320', 'DECLINED-LIMITATIONS-ON-BENEFICIARY-VALUE'), ('90330', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE'), ('90331', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-DAILY'), ('90332', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-WEEKLY'), ('90333', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-MONTHLY'), ('90334', 'DECLINED-LIMITATIONS-ON-ACCOUNT-VALUE-YEARLY'), ('90350', 'DECLINED-LIMITATIONS-ON-SENDER-QUANTITY'), ('90360', 'DECLINED-LIMITATIONS-ON-BENEFICIARY-QUANTITY'), ('90370', 'DECLINED-LIMITATIONS-ON-ACCOUNT-QUANTITY'), ('90400', 'DECLINED-PAYER-CURRENTLY-UNAVAILABLE')], default='10000', max_length=50, verbose_name='Transaction status description')),
                ('status_class', models.CharField(choices=[('1', 'CREATED'), ('2', 'CONFIRMED'), ('3', 'REJECTED'), ('4', 'CANCELLED'), ('5', 'SUBMITTED'), ('6', 'AVAILABLE'), ('7', 'COMPLETED'), ('8', 'REVERSED'), ('9', 'DECLINED')], default='1', max_length=50, verbose_name='Transaction status class')),
                ('status_class_message', models.CharField(choices=[('1', 'CREATED'), ('2', 'CONFIRMED'), ('3', 'REJECTED'), ('4', 'CANCELLED'), ('5', 'SUBMITTED'), ('6', 'AVAILABLE'), ('7', 'COMPLETED'), ('8', 'REVERSED'), ('9', 'DECLINED')], default='1', max_length=50)),
                ('external_id', models.CharField(max_length=50, verbose_name='External ID')),
                ('external_code', models.CharField(max_length=50, verbose_name='External reference code')),
                ('payer_transaction_reference', models.CharField(blank=True, max_length=50, verbose_name='Payer transaction reference')),
                ('payer_transaction_code', models.CharField(blank=True, max_length=50, verbose_name='Payer transaction code')),
                ('creation_date', models.DateTimeField(max_length=50, verbose_name='Creation date in HTTP format')),
                ('expiration_date', models.DateTimeField(max_length=50, verbose_name='Expiration date in HTTP format')),
                ('callback_url', models.CharField(max_length=50, verbose_name='Callback URL')),
                ('wholesale_fx_rate', models.DecimalField(decimal_places=15, max_digits=15, verbose_name='Wholesale FX rate')),
                ('retail_rate', models.DecimalField(decimal_places=15, max_digits=15, verbose_name='Retail rate')),
                ('retail_fee', models.DecimalField(decimal_places=15, max_digits=15, verbose_name='Retail fee')),
                ('retail_fee_currency', models.CharField(max_length=50, verbose_name='Retail fee currency in ISO 4217 format')),
                ('purpose_of_remittance', models.CharField(max_length=50, verbose_name='Purpose of remittance')),
                ('additional_information_1', models.CharField(blank=True, max_length=50, verbose_name='Additional information')),
                ('additional_information_2', models.CharField(blank=True, max_length=50, verbose_name='Additional information')),
                ('additional_information_3', models.CharField(blank=True, max_length=50, verbose_name='Additional information')),
                ('beneficiary', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='beneficiary', to='beneficiary.Beneficiary', verbose_name='Beneficiary information')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender', to='sender.Sender', verbose_name='Sender information')),
            ],
            options={
                'verbose_name': 'transaction',
                'db_table': 'transaction',
                'index_together': {('sender', 'beneficiary')},
            },
        ),
    ]
