# Generated by Django 2.0.5 on 2018-07-17 15:59

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import drfaddons.datatypes


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BankAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('nickname', models.CharField(max_length=250, verbose_name='Nick Name')),
                ('description', models.TextField(null=True, verbose_name='Description')),
                ('accnumber', models.TextField(null=True, verbose_name='Account Number')),
                ('minbal', models.IntegerField(default=0, verbose_name='Minimum Balance')),
            ],
        ),
        migrations.CreateModel(
            name='BankMaster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('name', models.CharField(max_length=254, unique=True, verbose_name='Bank Name')),
                ('aliases', models.TextField(null=True, verbose_name='Aliases of Bank Name')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CreditCard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('nickname', models.CharField(max_length=250, verbose_name='Nick Name')),
                ('description', models.TextField(null=True, verbose_name='Description')),
                ('vendor', models.CharField(choices=[('V', 'VISA'), ('M', 'MAESTRO'), ('MC', 'MASTER CARD'), ('AMX', 'AMERICAN EXPRESS'), ('R', 'RUPAY')], max_length=5, verbose_name='Card Vendor')),
                ('limit', models.DecimalField(decimal_places=5, max_digits=50, verbose_name='Limit on Card')),
                ('statement_date', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(31)], verbose_name='Statement Generation Date')),
                ('duedate_duration', models.IntegerField(default=20, verbose_name='Statement Date - Due Date Duration')),
                ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='drf_account.BankAccount')),
                ('bank', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='drf_account.BankMaster')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DebitCard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('nickname', models.CharField(max_length=250, verbose_name='Nick Name')),
                ('description', models.TextField(null=True, verbose_name='Description')),
                ('vendor', models.CharField(choices=[('V', 'VISA'), ('M', 'MAESTRO'), ('MC', 'MASTER CARD'), ('AMX', 'AMERICAN EXPRESS'), ('R', 'RUPAY')], max_length=5, verbose_name='Card Vendor')),
                ('free_atmtransaction', models.IntegerField(default=10, verbose_name='Free ATM Transaction')),
                ('free_own_atmtransaction', models.IntegerField(default=5, verbose_name='Free Own ATM Transaction')),
                ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='drf_account.BankAccount')),
                ('bank', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='drf_account.BankMaster')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='bankaccount',
            name='bank',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='drf_account.BankMaster'),
        ),
        migrations.AddField(
            model_name='bankaccount',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='debitcard',
            unique_together={('nickname', 'created_by')},
        ),
        migrations.AlterUniqueTogether(
            name='creditcard',
            unique_together={('nickname', 'created_by')},
        ),
        migrations.AlterUniqueTogether(
            name='bankaccount',
            unique_together={('nickname', 'created_by')},
        ),
    ]
