# Generated by Django 2.1.7 on 2020-07-29 16:52

import compositefk.fields
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0011_auto_20200728_1746'),
        ('cliente', '0019_auto_20200728_1752'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartaoBandeira',
            fields=[
                ('dat_insercao', models.DateTimeField(auto_now_add=True, null=True)),
                ('dat_edicao', models.DateTimeField(auto_now=True, null=True)),
                ('dat_delete', models.DateTimeField(null=True)),
                ('usr_insercao', models.IntegerField(null=True)),
                ('usr_edicao', models.IntegerField(null=True)),
                ('usr_delete', models.IntegerField(null=True)),
                ('origem_insercao_codigo', models.CharField(max_length=200, null=True)),
                ('origem_insercao_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('origem_edicao_codigo', models.CharField(max_length=200, null=True)),
                ('origem_edicao_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('origem_delete_codigo', models.CharField(max_length=200, null=True)),
                ('origem_delete_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('status', models.BooleanField(default=True, null=True)),
                ('nome', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('nm_descritivo', models.CharField(max_length=200, null=True)),
                ('imagem', models.FileField(default='bandeiras/sem-imagem.jpg', null=True, upload_to='bandeiras')),
                ('origem_delete', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeira_origem_delete', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_delete_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_delete_tipo')})),
                ('origem_edicao', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeira_origem_edicao', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_edicao_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_edicao_tipo')})),
                ('origem_insercao', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeira_origem_insercao', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_insercao_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_insercao_tipo')})),
            ],
            options={
                'db_table': 'cliente_cartaobandeira',
                'abstract': False,
                'managed': True,
            },
            managers=[
                ('normal_objects', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='CartaoBandeiraParcela',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dat_insercao', models.DateTimeField(auto_now_add=True, null=True)),
                ('dat_edicao', models.DateTimeField(auto_now=True, null=True)),
                ('dat_delete', models.DateTimeField(null=True)),
                ('usr_insercao', models.IntegerField(null=True)),
                ('usr_edicao', models.IntegerField(null=True)),
                ('usr_delete', models.IntegerField(null=True)),
                ('origem_insercao_codigo', models.CharField(max_length=200, null=True)),
                ('origem_insercao_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('origem_edicao_codigo', models.CharField(max_length=200, null=True)),
                ('origem_edicao_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('origem_delete_codigo', models.CharField(max_length=200, null=True)),
                ('origem_delete_tipo', models.CharField(default='USR.PROFILE', max_length=200, null=True)),
                ('status', models.BooleanField(default=True, null=True)),
                ('quantidade', models.IntegerField(default=1, null=True)),
                ('is_juros', models.BooleanField(default=False, null=True)),
                ('bandeira', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='cliente.CartaoBandeira')),
                ('origem_delete', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeiraparcela_origem_delete', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_delete_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_delete_tipo')})),
                ('origem_edicao', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeiraparcela_origem_edicao', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_edicao_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_edicao_tipo')})),
                ('origem_insercao', compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartaobandeiraparcela_origem_insercao', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('origem_insercao_codigo'), 'tipo': compositefk.fields.LocalFieldValue('origem_insercao_tipo')})),
            ],
            options={
                'db_table': 'cliente_cartaobandeiraparcela',
                'abstract': False,
                'managed': True,
            },
            managers=[
                ('normal_objects', django.db.models.manager.Manager()),
            ],
        ),
        migrations.AddField(
            model_name='cartao',
            name='adquirente',
            field=compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartao_adquirente', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('tipo_codigo'), 'tipo': compositefk.fields.LocalFieldValue('tipo_tipo')}),
        ),
        migrations.AddField(
            model_name='cartao',
            name='adquirente_codigo',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='adquirente_tipo',
            field=models.CharField(default='CLIENTE.CARTAO.ADQUIRENTE', max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='cartao_token',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='cliente_token',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='dat_val',
            field=models.CharField(max_length=5, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='nm_impresso',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='tipo',
            field=compositefk.fields.CompositeForeignKey(null=True, null_if_equal=[], on_delete=django.db.models.deletion.DO_NOTHING, related_name='cliente_cartao', to='core.Tipo', to_fields={'codigo': compositefk.fields.LocalFieldValue('tipo_codigo'), 'tipo': compositefk.fields.LocalFieldValue('tipo_tipo')}),
        ),
        migrations.AddField(
            model_name='cartao',
            name='tipo_codigo',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='tipo_tipo',
            field=models.CharField(default='CLIENTE.CARTAO', max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='ultimos_4',
            field=models.CharField(max_length=4, null=True),
        ),
        migrations.AddField(
            model_name='cartao',
            name='bandeira',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='cliente.CartaoBandeira'),
        ),
    ]
