# Generated by Django 2.1.7 on 2020-07-02 15:28

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager


class Migration(migrations.Migration):

    dependencies = [
        ('usr', '0002_auto_20200702_1228'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0002_auto_20200630_1143'),
    ]

    operations = [
        migrations.CreateModel(
            name='Data',
            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)),
                ('status', models.BooleanField(default=True, null=True)),
                ('anomesdia', models.IntegerField(primary_key=True, serialize=False)),
                ('anomes', models.IntegerField(null=True)),
                ('ano', models.IntegerField(null=True)),
                ('dat_dia', models.DateTimeField(null=True)),
                ('nr_mes', models.IntegerField(null=True)),
                ('ds_mes', models.CharField(max_length=50, null=True)),
                ('ds_mes_abreviado', models.CharField(max_length=3, null=True)),
                ('nr_dia', models.IntegerField(null=True)),
                ('ds_dia_semana', models.CharField(max_length=50, null=True)),
                ('nr_semana_ano', models.IntegerField(null=True)),
                ('ds_semana_ano', models.CharField(max_length=50, null=True)),
                ('nr_semana_mes', models.IntegerField(null=True)),
                ('ds_semana_mes', models.CharField(max_length=50, null=True)),
                ('nr_bimestre_ano', models.IntegerField(null=True)),
                ('ds_bimestre_ano', models.CharField(max_length=50, null=True)),
                ('nr_trimestre_ano', models.IntegerField(null=True)),
                ('ds_trimestre_ano', models.CharField(max_length=50, null=True)),
                ('nr_quadrimestre_ano', models.IntegerField(null=True)),
                ('ds_quadrimestre_ano', models.CharField(max_length=50, null=True)),
                ('nr_semestre_ano', models.IntegerField(null=True)),
                ('ds_semestre_ano', models.CharField(max_length=50, null=True)),
                ('nr_primeiro_dia_anomes', models.IntegerField(null=True)),
                ('is_ultimo_dia_mes', models.BooleanField(null=True)),
                ('ds_feriado_nacional', models.CharField(max_length=200, null=True)),
                ('usr_delete', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_data_usr_delete', to=settings.AUTH_USER_MODEL)),
                ('usr_edicao', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_data_usr_edicao', to=settings.AUTH_USER_MODEL)),
                ('usr_insercao', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_data_usr_insercao', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'data',
            },
            managers=[
                ('normal_objects', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Municipio',
            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)),
                ('status', models.BooleanField(default=True, null=True)),
                ('codigo', models.IntegerField(primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=200)),
            ],
            options={
                'db_table': 'municipio',
            },
            managers=[
                ('normal_objects', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='UF',
            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)),
                ('status', models.BooleanField(default=True, null=True)),
                ('codigo', models.IntegerField(primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=200, null=True)),
                ('nm_abrev', models.CharField(max_length=2, null=True)),
                ('usr_delete', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_uf_usr_delete', to=settings.AUTH_USER_MODEL)),
                ('usr_edicao', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_uf_usr_edicao', to=settings.AUTH_USER_MODEL)),
                ('usr_insercao', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_uf_usr_insercao', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'uf',
            },
            managers=[
                ('normal_objects', django.db.models.manager.Manager()),
            ],
        ),
        migrations.RemoveField(
            model_name='sistema',
            name='usr_delete',
        ),
        migrations.RemoveField(
            model_name='sistema',
            name='usr_edicao',
        ),
        migrations.RemoveField(
            model_name='sistema',
            name='usr_insercao',
        ),
        migrations.RemoveField(
            model_name='versao',
            name='sistema',
        ),
        migrations.DeleteModel(
            name='Sistema',
        ),
        migrations.AddField(
            model_name='municipio',
            name='uf',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='core.UF'),
        ),
        migrations.AddField(
            model_name='municipio',
            name='usr_delete',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_municipio_usr_delete', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='municipio',
            name='usr_edicao',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_municipio_usr_edicao', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='municipio',
            name='usr_insercao',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='core_municipio_usr_insercao', to=settings.AUTH_USER_MODEL),
        ),
    ]
