# Generated by Django 3.1.7 on 2021-04-11 22:35

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CreditsType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('credit_name', models.CharField(max_length=32, verbose_name='Credit Name')),
                ('credit_rate', models.FloatField(verbose_name='Credit Rate')),
                ('credit_term', models.FloatField(verbose_name='Credit Term')),
                ('description', models.TextField(verbose_name='Description')),
            ],
        ),
        migrations.CreateModel(
            name='DepositsType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deposit_name', models.CharField(max_length=32, verbose_name='Deposit Name')),
                ('deposit_rate', models.FloatField(verbose_name='Deposit Rate')),
                ('deposit_term', models.DurationField(verbose_name='Deposit Term')),
                ('description', models.TextField(verbose_name='Description')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('birth_date', models.DateField(blank=True, null=True, verbose_name='Birth Date')),
                ('phone_number', models.CharField(max_length=13, verbose_name='Phone')),
                ('passport_number', models.CharField(max_length=9, verbose_name='PASSPORT №')),
                ('identification_number', models.CharField(max_length=9, verbose_name='IDENTIFICATION №')),
                ('place_of_birth', models.CharField(max_length=9, verbose_name='Place od birth')),
                ('User', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Deposit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_number', models.CharField(max_length=16, verbose_name='Contract Number')),
                ('opening_date', models.DateField(verbose_name='Opening Date')),
                ('deposit_amount', models.FloatField(verbose_name='Deposit Amount')),
                ('status', models.BooleanField(default=False, verbose_name='Deposit Status')),
                ('type_of_deposit', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bank.depositstype')),
                ('userprofile', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bank.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Credit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_number', models.CharField(max_length=16, verbose_name='Contract Number')),
                ('opening_date', models.DateField(verbose_name='Opening Date')),
                ('credit_amount', models.FloatField(verbose_name='Credit Amount')),
                ('status', models.BooleanField(default=False, verbose_name='Credit Status')),
                ('overdue_status', models.BooleanField(default=False, verbose_name='Overdue Status')),
                ('paid_off', models.FloatField(verbose_name='Paid Off')),
                ('type_of_credit', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bank.creditstype')),
                ('userprofile', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bank.profile')),
            ],
        ),
    ]
