# Generated by Django 4.2.20 on 2025-04-02 17:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(blank=True, max_length=500, null=True)),
            ],
            options={
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('business', models.CharField(blank=True, max_length=500, null=True)),
                ('first', models.CharField(blank=True, max_length=500, null=True)),
                ('last', models.CharField(blank=True, max_length=500, null=True)),
                ('street', models.CharField(blank=True, max_length=500, null=True)),
                ('address2', models.CharField(blank=True, max_length=500, null=True)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Keyword',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('service', models.CharField(blank=True, max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_cat', models.CharField(blank=True, max_length=500, null=True)),
            ],
            options={
                'verbose_name_plural': 'Sub Categories',
            },
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('trans_type', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name_plural': 'Types',
            },
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('date_created', models.DateField(auto_now_add=True)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=20)),
                ('invoice_numb', models.CharField(blank=True, max_length=500, null=True)),
                ('paid', models.CharField(blank=True, default='No', max_length=500, null=True)),
                ('transaction', models.CharField(blank=True, max_length=500, null=True)),
                ('receipt', models.CharField(blank=True, max_length=500, null=True)),
                ('tax', models.CharField(blank=True, default='Yes', max_length=500, null=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.category')),
                ('keyword', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='finance.keyword')),
                ('sub_cat', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.subcategory')),
                ('team', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='finance.team')),
                ('trans_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.type')),
            ],
            options={
                'verbose_name_plural': 'Transactions',
                'ordering': ['date'],
            },
        ),
        migrations.CreateModel(
            name='InvoiceItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('invoice_numb', models.CharField(blank=True, max_length=500, null=True)),
                ('qty', models.IntegerField(blank=True, default='1', null=True)),
                ('price', models.DecimalField(decimal_places=2, default='100.00', max_digits=20)),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.service')),
            ],
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('invoice_numb', models.CharField(max_length=10, unique=True)),
                ('event', models.CharField(blank=True, max_length=500, null=True)),
                ('location', models.CharField(blank=True, max_length=500, null=True)),
                ('amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=100)),
                ('date', models.DateField()),
                ('due', models.DateField()),
                ('paid', models.CharField(blank=True, default='No', max_length=100, null=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.client')),
                ('keyword', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='finance.keyword')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='finance.service')),
            ],
            options={
                'verbose_name_plural': 'Invoices',
                'ordering': ['invoice_numb'],
            },
        ),
    ]
