# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-24 06:13
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('general', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Boletas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('establecimiento', models.IntegerField(choices=[(1, 'Primer Nivel'), (2, 'Segundo Nivel')])),
                ('identidad', models.CharField(max_length=13)),
                ('expediente', models.CharField(blank=True, max_length=50, null=True)),
                ('sexo', models.IntegerField(choices=[(1, 'Hombre'), (2, 'Mujer')])),
                ('edad_anios', models.IntegerField()),
                ('edad_meses', models.IntegerField()),
                ('pseudonimo', models.CharField(blank=True, max_length=150, null=True)),
                ('estado_civil', models.IntegerField(choices=[(1, 'Soltero(a)'), (2, 'Casado(a)'), (3, 'Union Libre')])),
                ('telefono_fijo', models.CharField(blank=True, max_length=10, null=True)),
                ('telefono_celular', models.CharField(blank=True, max_length=10, null=True)),
                ('calle', models.CharField(blank=True, max_length=100, null=True)),
                ('bloque', models.CharField(blank=True, max_length=10, null=True)),
                ('numero_casa', models.CharField(blank=True, max_length=10, null=True)),
                ('referencias', models.CharField(blank=True, max_length=500, null=True)),
                ('otro_grupo_etnico', models.CharField(blank=True, max_length=50, null=True)),
                ('identidad_madre', models.CharField(blank=True, max_length=13, null=True)),
                ('nombre_madre', models.CharField(blank=True, max_length=150, null=True)),
                ('telefono_madre', models.CharField(blank=True, max_length=10, null=True)),
                ('identidad_padre', models.CharField(blank=True, max_length=13, null=True)),
                ('nombre_padre', models.CharField(blank=True, max_length=150, null=True)),
                ('telefono_padre', models.CharField(blank=True, max_length=10, null=True)),
                ('identidad_tutor', models.CharField(blank=True, max_length=13, null=True)),
                ('nombre_tutor', models.CharField(blank=True, max_length=150, null=True)),
                ('telefono_tutor', models.CharField(blank=True, max_length=10, null=True)),
                ('direccion_tutor', models.CharField(blank=True, max_length=500, null=True)),
                ('fecha_ultima_menstruacion', models.CharField(blank=True, max_length=10, null=True)),
                ('rnp', models.NullBooleanField()),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
                ('fecha_actualizacion', models.DateTimeField(auto_now=True)),
                ('actividad_economica', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='general.ActividadesEconomicas')),
                ('actualizado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actualizado_por_boleta', to=settings.AUTH_USER_MODEL)),
                ('barrio', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='boleta_origen_barrios', to='general.Ciudades')),
                ('ciudad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='boleta_origen_ciudades', to='general.Ciudades')),
            ],
        ),
        migrations.CreateModel(
            name='BoletasConsejeria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_consejeria', models.CharField(blank=True, max_length=10, null=True)),
                ('periodicidad', models.IntegerField(blank=True, null=True)),
                ('nombre_persona_solicitante', models.CharField(blank=True, max_length=150, null=True)),
                ('nombre_consejero', models.CharField(blank=True, max_length=150, null=True)),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
                ('fecha_actualizacion', models.DateTimeField(auto_now=True)),
                ('actualizado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actualizado_por_boleta_consejeria', to=settings.AUTH_USER_MODEL)),
                ('boleta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boleta.Boletas')),
                ('creado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creado_por_boleta_consejeria', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BoletasConsejeriaPostPrueba',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_consejeria', models.CharField(blank=True, max_length=10, null=True)),
                ('nombre_consejero', models.CharField(blank=True, max_length=150, null=True)),
                ('observaciones', models.CharField(blank=True, max_length=255, null=True)),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
                ('fecha_actualizacion', models.DateTimeField(auto_now=True)),
                ('actualizado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actualizado_por_boleta_postprueba', to=settings.AUTH_USER_MODEL)),
                ('boleta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boleta.Boletas')),
                ('creado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creado_por_boleta_postprueba', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BoletasObservaciones',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre_consejero', models.CharField(max_length=150)),
                ('observaciones', models.CharField(max_length=255)),
                ('tipo_observacion', models.IntegerField(blank=True, null=True)),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
                ('fecha_actualizacion', models.DateTimeField(auto_now=True)),
                ('actualizado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actualizado_por_boleta_obs', to=settings.AUTH_USER_MODEL)),
                ('boleta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boleta.Boletas')),
                ('creado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creado_por_boleta_obs', to=settings.AUTH_USER_MODEL)),
                ('establecimiento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='general.Establecimientos')),
            ],
        ),
        migrations.CreateModel(
            name='Condiciones',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255)),
                ('orden', models.IntegerField()),
                ('activa', models.BooleanField(default=True)),
            ],
        ),
        migrations.AddField(
            model_name='boletas',
            name='condiciones',
            field=models.ManyToManyField(to='boleta.Condiciones'),
        ),
        migrations.AddField(
            model_name='boletas',
            name='creado_por',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creado_por_boleta', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='boletas',
            name='departamento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='general.Departamentos'),
        ),
        migrations.AddField(
            model_name='boletas',
            name='grupo_etnico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='general.GruposEtnicos'),
        ),
        migrations.AddField(
            model_name='boletas',
            name='municipio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='general.Municipios'),
        ),
        migrations.AddField(
            model_name='boletas',
            name='ocupacion',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='general.Ocupaciones'),
        ),
        migrations.AddField(
            model_name='boletas',
            name='poblacion',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='general.Poblaciones'),
        ),
    ]
