# Generated by Django 5.2.16 on 2026-08-11 21:44

import django.db.models.deletion
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('core', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='FinanceEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scope', models.CharField(choices=[('CAMPUS', 'Campus'), ('NATIONAL', 'National')], max_length=15)),
                ('direction', models.CharField(choices=[('INCOME', 'Income'), ('EXPENSE', 'Expense')], max_length=10)),
                ('category', models.CharField(choices=[('OFFERTORY', 'Offertory'), ('DONATION', 'Donation'), ('DUES', 'Dues'), ('PROGRAM', 'Program income'), ('TRANSPORT', 'Transport'), ('WELFARE', 'Welfare'), ('VENUE', 'Venue'), ('OTHER', 'Other')], max_length=20)),
                ('amount', models.DecimalField(decimal_places=2, default=Decimal('0'), max_digits=14)),
                ('currency', models.CharField(default='GHS', max_length=3)),
                ('transaction_date', models.DateField()),
                ('reference', models.CharField(blank=True, max_length=100)),
                ('description', models.CharField(max_length=255)),
                ('submitted_at', models.DateTimeField(auto_now_add=True)),
                ('approved', models.BooleanField(default=False)),
                ('campus', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='finance_entries', to='core.campus')),
                ('submitted_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-transaction_date', '-submitted_at'],
            },
        ),
    ]
