# Generated by Django 6.0.4 on 2026-06-06 08:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('projects', '0005_projectfund_conversion_timing'),
    ]

    operations = [
        migrations.CreateModel(
            name='FundDocument',
            fields=[
                ('id', models.UUIDField(default=apps.projects.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('category', models.CharField(choices=[('proposal', 'Proposal'), ('agreement', 'Agreement'), ('reporting', 'Reporting'), ('compliance', 'Compliance & Audit')], db_index=True, default='proposal', max_length=20)),
                ('title', models.CharField(max_length=255)),
                ('document', models.FileField(blank=True, null=True, upload_to='fund_documents/')),
                ('date', models.DateField(blank=True, help_text='Signed / submitted / due date depending on category.', null=True)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=14, null=True)),
                ('status', models.CharField(blank=True, choices=[('draft', 'Draft'), ('submitted', 'Submitted'), ('approved', 'Approved'), ('signed', 'Signed'), ('overdue', 'Overdue')], max_length=20)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('fund', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fund_documents', to='projects.projectfund')),
            ],
            options={
                'db_table': 'fund_documents',
                'ordering': ['-date', '-created_at'],
                'indexes': [models.Index(fields=['fund', 'category'], name='fund_docume_fund_id_7fb1a6_idx')],
            },
        ),
    ]
