# Generated by Django 5.2.7 on 2025-11-03 05:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0005_add_role_template_rollback_point'),
        ('utils', '0017_merge_20250902_0300'),
    ]

    operations = [
        migrations.AddField(
            model_name='notification',
            name='action_required',
            field=models.BooleanField(default=False, help_text='Whether this notification requires immediate action'),
        ),
        migrations.AddField(
            model_name='notification',
            name='alert_data',
            field=models.JSONField(blank=True, default=dict, help_text='Additional alert data in JSON format'),
        ),
        migrations.AddField(
            model_name='notification',
            name='portfolio_snapshot',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='users.portfoliosnapshot'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='notification_type',
            field=models.CharField(choices=[('loan_approved', 'Loan Approved'), ('loan_rejected', 'Loan Rejected'), ('payment_due', 'Payment Due'), ('payment_received', 'Payment Received'), ('document_uploaded', 'Document Uploaded'), ('document_rejected', 'Document Rejected'), ('loan_overdue', 'Loan Overdue'), ('credit_score_update', 'Credit Score Update'), ('system_maintenance', 'System Maintenance'), ('security_alert', 'Security Alert'), ('profile_update', 'Profile Update'), ('new_feature', 'New Feature'), ('application_submitted', 'Application Submitted'), ('application_reviewed', 'Application Reviewed'), ('loan_disbursed', 'Loan Disbursed'), ('repayment_reminder', 'Repayment Reminder'), ('late_payment', 'Late Payment'), ('loan_completed', 'Loan Completed'), ('rollover_request', 'Rollover Request'), ('rollover_approved', 'Rollover Approved'), ('rollover_rejected', 'Rollover Rejected'), ('document_expired', 'Document Expired'), ('kyc_required', 'KYC Required'), ('kyc_completed', 'KYC Completed'), ('kyc_rejected', 'KYC Rejected'), ('system_update', 'System Update'), ('maintenance_scheduled', 'Maintenance Scheduled'), ('login_alert', 'Login Alert'), ('password_changed', 'Password Changed'), ('account_locked', 'Account Locked'), ('account_unlocked', 'Account Unlocked'), ('loan_extension', 'Loan Extension'), ('penalty_applied', 'Penalty Applied'), ('refund_processed', 'Refund Processed'), ('statement_ready', 'Statement Ready'), ('receipt_generated', 'Receipt Generated'), ('offer_letter_sent', 'Offer Letter Sent'), ('offer_letter_signed', 'Offer Letter Signed'), ('collateral_required', 'Collateral Required'), ('collateral_verified', 'Collateral Verified'), ('collateral_rejected', 'Collateral Rejected'), ('portfolio_alert', 'Portfolio Alert'), ('portfolio_health_critical', 'Critical Portfolio Health'), ('portfolio_health_warning', 'Portfolio Health Warning'), ('high_default_rate', 'High Default Rate'), ('low_collection_rate', 'Low Collection Rate'), ('high_par', 'High Portfolio at Risk'), ('negative_growth', 'Negative Portfolio Growth'), ('portfolio_milestone', 'Portfolio Milestone'), ('performance_summary', 'Performance Summary')], default='system_maintenance', max_length=50),
        ),
    ]
