# Generated by Django 3.1.7 on 2021-02-27 15:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AccountHeads',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
            ],
            options={
                'verbose_name': 'Account Head',
                'verbose_name_plural': 'Account Heads',
                'db_table': 'account_heads',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='AccountName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('acc_name', models.CharField(max_length=60)),
                ('opening_balance', models.FloatField()),
                ('closing_balance', models.FloatField()),
            ],
            options={
                'verbose_name': 'Account Name',
                'verbose_name_plural': 'Account Names',
                'db_table': 'account_name',
                'ordering': ['acc_name'],
            },
        ),
        migrations.CreateModel(
            name='JournalLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('transaction_date', models.DateField()),
                ('reference_no', models.CharField(max_length=120)),
            ],
            options={
                'verbose_name': 'Journal Log',
                'verbose_name_plural': 'Journal Logs',
                'db_table': 'journal_log',
                'ordering': ['transaction_date'],
            },
        ),
        migrations.CreateModel(
            name='JournalLogDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.FloatField()),
                ('account_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='account', to='eclapp.accountname')),
                ('journal_log', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='journals', to='eclapp.journallog')),
            ],
            options={
                'verbose_name': 'Journal Log Detail',
                'verbose_name_plural': 'Journal Log Details',
                'db_table': 'journal_log_details',
                'ordering': ['account_name'],
            },
        ),
        migrations.CreateModel(
            name='AccountType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('acc_type_name', models.CharField(max_length=60)),
                ('acc_head', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accounthead', to='eclapp.accountheads')),
            ],
            options={
                'verbose_name': 'Account Type',
                'verbose_name_plural': 'Account Types',
                'db_table': 'account_type',
                'ordering': ['acc_type_name'],
            },
        ),
        migrations.AddField(
            model_name='accountname',
            name='type_of_acc',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accounttype', to='eclapp.accounttype'),
        ),
    ]
