# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-04-08 16:55
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='account',
            fields=[
                ('account_no', models.CharField(max_length=12, primary_key=True, serialize=False)),
                ('account_type', models.CharField(choices=[('S', 'Saving'), ('F', 'Fixed')], max_length=1)),
                ('balance', models.DecimalField(decimal_places=10, default=Decimal('0.00'), max_digits=18)),
            ],
        ),
        migrations.CreateModel(
            name='atm_card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('atm_card_no', models.CharField(max_length=16)),
                ('account_nd', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vasubank.account')),
            ],
        ),
        migrations.CreateModel(
            name='customer',
            fields=[
                ('cust_id', models.CharField(max_length=15, primary_key=True, serialize=False)),
                ('cust_name', models.CharField(max_length=100)),
                ('cust_addr', models.CharField(max_length=100)),
                ('cust_phone', models.CharField(max_length=13)),
                ('cust_dob', models.DateField()),
                ('cust_gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('cust_email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now=True)),
                ('transaction_type', models.CharField(choices=[('W', 'Withdraw'), ('D', 'Deposit')], max_length=1)),
                ('transaction_status', models.CharField(choices=[('0', 'Executed'), ('1', 'Pending'), ('2', 'Success'), ('3', 'Cancelled')], default=None, max_length=1)),
                ('account_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vasubank.account')),
                ('cust_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vasubank.customer')),
            ],
        ),
        migrations.AddField(
            model_name='account',
            name='cust_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vasubank.customer'),
        ),
    ]
