# Generated by Django 5.1.11 on 2025-06-20 03:57

import apps.transactions.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0014_alter_account_options_alter_accountgroup_options'),
        ('transactions', '0042_alter_transactioncategory_options_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='QuickTransaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
                ('type', models.CharField(choices=[('IN', 'Income'), ('EX', 'Expense')], default='EX', max_length=2, verbose_name='Type')),
                ('is_paid', models.BooleanField(default=True, verbose_name='Paid')),
                ('amount', models.DecimalField(decimal_places=30, max_digits=42, validators=[apps.transactions.validators.validate_non_negative, apps.transactions.validators.validate_decimal_places], verbose_name='Amount')),
                ('description', models.CharField(blank=True, max_length=500, verbose_name='Description')),
                ('notes', models.TextField(blank=True, verbose_name='Notes')),
                ('internal_note', models.TextField(blank=True, verbose_name='Internal Note')),
                ('internal_id', models.TextField(blank=True, null=True, unique=True, verbose_name='Internal ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quick_transactions', to='accounts.account', verbose_name='Account')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='transactions.transactioncategory', verbose_name='Category')),
                ('entities', models.ManyToManyField(blank=True, related_name='quick_transactions', to='transactions.transactionentity', verbose_name='Entities')),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_owned', to=settings.AUTH_USER_MODEL)),
                ('tags', models.ManyToManyField(blank=True, to='transactions.transactiontag', verbose_name='Tags')),
            ],
            options={
                'verbose_name': 'Quick Transaction',
                'verbose_name_plural': 'Quick Transactions',
                'db_table': 'quick_transactions',
                'default_manager_name': 'objects',
            },
        ),
    ]
