# Generated by Django 4.0.6 on 2022-07-28 02:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ImpersonalAccount',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('type_ac', models.CharField(blank=True, choices=[('AS', 'Asset'), ('LI', 'Liability'), ('IN', 'Income'), ('EX', 'Expense')], max_length=2)),
                ('code', models.CharField(blank=True, default=None, max_length=255, null=True, unique=True)),
                ('parent_ac', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, to='coasc.impersonalaccount')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, default='')),
            ],
        ),
        migrations.CreateModel(
            name='Split',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_split', models.CharField(choices=[('dr', 'Debit'), ('cr', 'Credit')], max_length=2)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=11)),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coasc.impersonalaccount')),
                ('transaction', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coasc.transaction')),
            ],
        ),
    ]
