# Generated by Django 2.2.9 on 2020-02-28 23:33

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


class Migration(migrations.Migration):

    dependencies = [
        ('client', '0003_auto_20190629_1936'),
        ('core', '0004_auto_20200120_1817'),
        ('document', '0003_auto_20200120_1817'),
        ('accounting', '0016_auto_20200210_1400'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='accountcharge',
            options={'verbose_name': 'antares.apps.accounting.models.account_charge.table_name', 'verbose_name_plural': 'antares.apps.accounting.models.account_charge.table_name_plural'},
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='account_type',
            field=models.ForeignKey(db_column='account_type', default=None, on_delete=django.db.models.deletion.PROTECT, to='accounting.AccountType'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='base_document',
            field=models.ForeignKey(blank=True, db_column='base_document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='account_charge_base_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='charge_document',
            field=models.ForeignKey(blank=True, db_column='charge_document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='account_charge_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='charge_period',
            field=models.IntegerField(default=None),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='client',
            field=models.ForeignKey(db_column='client', default=None, on_delete=django.db.models.deletion.PROTECT, to='client.Client'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='accountcharge',
            name='concept_type',
            field=models.ForeignKey(blank=True, db_column='concept_type', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ConceptType'),
        ),
        migrations.AlterUniqueTogether(
            name='accountcharge',
            unique_together={('client', 'concept_type', 'period', 'account_type', 'charge_period')},
        ),
        migrations.AlterModelTable(
            name='accountcharge',
            table='acc_account_charge',
        ),
        migrations.RemoveField(
            model_name='accountcharge',
            name='balance',
        ),
    ]
