# Generated by Django 4.2.23 on 2025-10-30 14:56

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('myapp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client_name', models.CharField(blank=True, max_length=255, null=True)),
                ('phone', models.CharField(blank=True, max_length=20, null=True)),
                ('email', models.EmailField(blank=True, max_length=255, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('aadhar', models.CharField(blank=True, max_length=50, null=True)),
                ('pan', models.CharField(blank=True, max_length=10, null=True)),
                ('doj', models.CharField(blank=True, max_length=10, null=True)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('status', models.SmallIntegerField(default=1)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='clients', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'client',
            },
        ),
        migrations.CreateModel(
            name='Loan',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('loan_amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('loan_date', models.DateField()),
                ('interest_rate', models.DecimalField(decimal_places=2, max_digits=5)),
                ('loan_tenure_months', models.PositiveIntegerField()),
                ('emi_start_date', models.DateField()),
                ('collection_type', models.CharField(default='Day', max_length=10)),
                ('collection_day', models.CharField(max_length=50)),
                ('loan_status', models.CharField(default='Active', max_length=10)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='loans', to='myapp.client')),
            ],
            options={
                'db_table': 'loan',
            },
        ),
    ]
