# Generated by Django 3.1.1 on 2020-11-08 17:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Accounts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('slug', models.SlugField(max_length=250)),
                ('value_date', models.DateField(blank=True, verbose_name='Entry date dd/mm/yyyy')),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=100, null=True)),
                ('export_to_csv', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ('-value_date',),
            },
        ),
        migrations.CreateModel(
            name='AnnualReports',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(null=True)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('published', 'Published')], default='published', max_length=10)),
                ('accounttype', models.CharField(choices=[('interim', 'Interim'), ('year-end', 'Year-end')], default='interim', max_length=10)),
                ('auditor', models.CharField(choices=[('pwc', 'PWC'), ('kpmg', 'KPMG'), ('deloittes', 'Deloittes'), ('ey', 'ey'), ('bdo', 'bdo'), ('grant_thorton', 'Grant_Thorthon')], default=None, max_length=25)),
                ('reportcategory', models.CharField(choices=[('solo', 'Solo'), ('group', 'Group')], default='solo', max_length=10)),
                ('as_at_date', models.DateField(blank=True, verbose_name='Entry date dd/mm/yyyy')),
                ('count', models.IntegerField(default=0, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ChartOfAccounts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('accountno', models.CharField(default=None, max_length=15)),
                ('accountname', models.CharField(default=None, max_length=100)),
                ('subledger_no', models.CharField(default=None, max_length=25)),
                ('subname', models.CharField(default=None, max_length=100)),
                ('description', models.TextField(default=None, max_length=225)),
                ('category', models.CharField(choices=[('on_balance_sheet', 'On_balance_sheet'), ('off_balance_sheet', 'Off_balance_sheet')], default=None, max_length=100)),
                ('side', models.CharField(choices=[('dr', 'Dr'), ('cr', 'Cr')], default=None, max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Entity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entityname', models.CharField(blank=True, max_length=225)),
                ('entitynumber', models.CharField(blank=True, max_length=8, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ParentEntity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='SubLedger',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=100, null=True)),
                ('entrydate', models.DateTimeField(default=django.utils.timezone.now)),
                ('value_date', models.DateField(blank=True, default=None, verbose_name='Entry date dd/mm/yyyy')),
                ('export_to_csv', models.BooleanField(default=True)),
                ('entitynumber', models.ForeignKey(blank=True, default=None, max_length=6, on_delete=django.db.models.deletion.PROTECT, related_name='subledgerentityno', to='customerplatform.entity')),
                ('side', models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, related_name='subledgerside', to='customerplatform.chartofaccounts')),
                ('subledger_no', models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, related_name='subledgernumber', to='customerplatform.chartofaccounts')),
                ('subname', models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, related_name='subledgername', to='customerplatform.chartofaccounts')),
            ],
            options={
                'ordering': ('-value_date',),
            },
        ),
    ]
