# Generated by Django 2.2.6 on 2019-11-21 01:31

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Borrower',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('borrower_name', models.CharField(max_length=40)),
                ('contact_name', models.CharField(max_length=40)),
                ('contact_email_address', models.CharField(max_length=55)),
                ('contact_work_telephone', models.CharField(max_length=30)),
                ('contact_mobile_telephone', models.CharField(default=None, max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Loan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('loan_type', models.CharField(max_length=30)),
                ('payment_frequency', models.CharField(max_length=30)),
                ('loan_origination_amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('loan_convention', models.IntegerField()),
                ('loan_interest_rate', models.DecimalField(decimal_places=2, max_digits=12)),
                ('loan_term', models.DecimalField(decimal_places=1, max_digits=12)),
                ('date_loan_funded', models.DateField()),
                ('loan_settlement_date', models.DateField()),
                ('loan_maturity_date', models.DateField()),
                ('borrower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='loans', to='loans.Borrower')),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment_amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('payment_date', models.DateField()),
                ('borrower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='loans.Borrower')),
                ('loan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='loans.Loan')),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('line_1', models.CharField(max_length=255)),
                ('line_2', models.CharField(default=None, max_length=255)),
                ('city', models.CharField(max_length=255)),
                ('us_state', models.CharField(max_length=20)),
                ('zipcode', models.CharField(max_length=10)),
                ('borrower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to='loans.Borrower')),
            ],
        ),
    ]
