# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-02-27 20:21
from __future__ import unicode_literals

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Addresse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('postal_address', models.TextField(max_length=1000)),
                ('email', models.EmailField(max_length=254)),
                ('phone_no', models.IntegerField()),
                ('tel_no', models.IntegerField(blank=True)),
                ('resident_town', models.CharField(max_length=20)),
                ('estate', models.CharField(max_length=20)),
                ('house_no', models.IntegerField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='ATMCard',
            fields=[
                ('number', models.IntegerField(auto_created=True, editable=False, primary_key=True, serialize=False)),
                ('expiry_date', models.DateTimeField()),
                ('csv', models.IntegerField()),
                ('reg_date', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='CurrentAccount',
            fields=[
                ('account_number',
                 models.IntegerField(auto_created=True, editable=False, primary_key=True, serialize=False)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=7)),
                ('reg_date', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Personal_Information',
            fields=[
                ('first_name', models.CharField(max_length=50)),
                ('surname', models.CharField(max_length=50)),
                ('other_names', models.CharField(max_length=50)),
                ('id_number', models.IntegerField(primary_key=True, serialize=False)),
                ('passport', models.BooleanField(default=False)),
                ('passport_no', models.IntegerField(blank=True)),
                ('pin_no', models.IntegerField()),
                ('register_atm', models.BooleanField(default=True)),
                ('date_registered', models.DateTimeField(default=django.utils.timezone.now)),
                ('address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bank.Addresse')),
                ('atm_card', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bank.ATMCard')),
                (
                'current_ac', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bank.CurrentAccount')),
            ],
        ),
        migrations.CreateModel(
            name='SavingAccount',
            fields=[
                ('account_number',
                 models.IntegerField(auto_created=True, editable=False, primary_key=True, serialize=False)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=7)),
                ('reg_date', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.AddField(
            model_name='personal_information',
            name='saving_ac',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='bank.SavingAccount'),
        ),
        migrations.AddField(
            model_name='atmcard',
            name='atm_current',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bank.CurrentAccount'),
        ),
        migrations.AddField(
            model_name='atmcard',
            name='atm_saving',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='bank.SavingAccount'),
        ),
    ]
