# Generated by Django 6.0.7 on 2026-07-14 17:23

import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GeneratedReport',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('report_type', models.CharField(choices=[('revenue', 'Revenue Report'), ('expense', 'Expense Report'), ('profit', 'Profit Report'), ('outstanding_invoices', 'Outstanding Invoices'), ('paid_invoices', 'Paid Invoices'), ('customer_balances', 'Customer Balances'), ('tax', 'Tax Report'), ('cash_flow', 'Cash Flow'), ('monthly_summary', 'Monthly Summary'), ('yearly_summary', 'Yearly Summary')], max_length=32)),
                ('period_start', models.DateField()),
                ('period_end', models.DateField()),
                ('file', models.FileField(blank=True, null=True, upload_to='reports/')),
                ('parameters', models.JSONField(blank=True, default=dict)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reports', to='accounts.company')),
                ('generated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='reports_generated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
