# Generated by Django 3.0.2 on 2020-01-31 21:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Loan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('loan_amount', models.IntegerField()),
                ('hold_amount', models.IntegerField()),
                ('profit_amount', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Participants',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
            ],
        ),
        migrations.CreateModel(
            name='Pyments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pyment', models.IntegerField()),
                ('date', models.DateField(auto_now_add=True)),
                ('loan', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='Loans.Loan')),
            ],
        ),
        migrations.CreateModel(
            name='pyment_remaining',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('paid_amount', models.IntegerField()),
                ('pyments', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Loans.Pyments')),
            ],
        ),
        migrations.AddField(
            model_name='loan',
            name='participant',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Loans.Participants'),
        ),
    ]
