# Generated by Django 6.0.4 on 2026-06-06 02:55

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BudgetCategory',
            fields=[
                ('id', models.UUIDField(default=apps.finance.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('code', models.CharField(blank=True, max_length=20, unique=True)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'budget categories',
                'db_table': 'budget_categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='BudgetItem',
            fields=[
                ('id', models.UUIDField(default=apps.finance.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('code', models.CharField(blank=True, max_length=30)),
                ('name', models.CharField(max_length=255)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='finance.budgetcategory')),
            ],
            options={
                'db_table': 'budget_items',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['category'], name='budget_item_categor_b0fc37_idx')],
            },
        ),
    ]
