# Generated by Django 2.0.9 on 2018-10-21 04:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('believe_his_prophets', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Entidad',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=60)),
                ('nombre_corto', models.CharField(max_length=60)),
                ('logo', models.ImageField(blank=True,
                                           default='logo/default.png', null=True, upload_to='entidad')),
                ('estado', models.CharField(blank=True, max_length=1, null=True)),
                ('nombre_variante', models.UUIDField(
                    blank=True, db_column='nombre_variante_id', null=True)),
            ],
            options={
                'verbose_name_plural': 'entidad',
                'verbose_name': 'entidad',
            },
        ),
        migrations.CreateModel(
            name='Hierarchy',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('logo', models.ImageField(blank=True,
                                           default='logo/default.png', null=True, upload_to='logos')),
                ('code', models.CharField(max_length=60, unique=True)),
                ('fiscal_creation_date', models.DateField(blank=True, null=True)),
                ('fiscal_address', models.CharField(
                    blank=True, max_length=40, null=True)),
                ('resolution', models.CharField(
                    blank=True, max_length=60, null=True)),
                ('authorization', models.CharField(
                    blank=True, max_length=60, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('order', models.IntegerField(default=1)),
                ('latitude', models.CharField(
                    blank=True, max_length=1000, null=True)),
                ('longitude', models.CharField(
                    blank=True, max_length=1000, null=True)),
                ('ubigeo', models.UUIDField(
                    blank=True, db_column='ubigeo_id', null=True)),
                ('legal_person', models.UUIDField(
                    blank=True, db_column='legal_person_id', null=True)),
                ('area_desempenio', models.UUIDField(
                    blank=True, db_column='area_desempenio_id', null=True)),
                ('entity', models.ForeignKey(blank=True, db_column='entity_id', null=True,
                                             on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.Entidad')),
            ],
            options={
                'verbose_name_plural': 'hierarchys',
                'verbose_name': 'hierarchy',
            },
        ),
        migrations.CreateModel(
            name='HierarchyType',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=60)),
                ('state', models.CharField(blank=True, max_length=10, null=True)),
                ('connector', models.CharField(blank=True, max_length=30, null=True)),
                ('abbreviation', models.CharField(
                    blank=True, max_length=10, null=True)),
                ('code_hierarchy_type', models.CharField(
                    blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name_plural': 'hierarchy types',
                'verbose_name': 'hierarchy type',
                'db_table': 'auth_xe_hierarchy_type',
            },
        ),
        migrations.CreateModel(
            name='Sucursal',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=300)),
                ('referencia', models.CharField(max_length=300)),
                ('latitud', models.CharField(max_length=500)),
                ('longitud', models.CharField(max_length=500)),
                ('estado', models.CharField(blank=True, max_length=2, null=True)),
                ('tipo_sucursal', models.UUIDField(
                    blank=True, db_column='tipo_sucursal_id', null=True)),
                ('ubigeo', models.UUIDField(
                    blank=True, db_column='ubigeo_id', null=True)),
            ],
            options={
                'verbose_name_plural': 'sucursal',
                'verbose_name': 'sucursal',
                'db_table': 'auth_xe_sucursal',
            },
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='hierarchy_type',
            field=models.ForeignKey(db_column='hierarchy_type_id',
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.HierarchyType'),
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='parent',
            field=models.ForeignKey(blank=True, db_column='parent_id', null=True, on_delete=django.db.models.deletion.PROTECT,
                                    related_name='childrens', to='believe_his_prophets.Hierarchy'),
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='sucursal',
            field=models.ForeignKey(blank=True, db_column='sucursal_id', null=True,
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.Sucursal'),
        ),
        migrations.AddField(
            model_name='entidad',
            name='hierarchy_type',
            field=models.ForeignKey(db_column='hierarchy_type_id',
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.HierarchyType'),
        ),
    ]

# Generated by Django 2.0.9 on 2018-10-21 04:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('believe_his_prophets', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Entidad',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=60)),
                ('nombre_corto', models.CharField(max_length=60)),
                ('logo', models.ImageField(blank=True,
                                           default='logo/default.png', null=True, upload_to='entidad')),
                ('estado', models.CharField(blank=True, max_length=1, null=True)),
                ('nombre_variante', models.UUIDField(
                    blank=True, db_column='nombre_variante_id', null=True)),
            ],
            options={
                'verbose_name_plural': 'entidad',
                'verbose_name': 'entidad',
            },
        ),
        migrations.CreateModel(
            name='Hierarchy',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('logo', models.ImageField(blank=True,
                                           default='logo/default.png', null=True, upload_to='logos')),
                ('code', models.CharField(max_length=60, unique=True)),
                ('fiscal_creation_date', models.DateField(blank=True, null=True)),
                ('fiscal_address', models.CharField(
                    blank=True, max_length=40, null=True)),
                ('resolution', models.CharField(
                    blank=True, max_length=60, null=True)),
                ('authorization', models.CharField(
                    blank=True, max_length=60, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('order', models.IntegerField(default=1)),
                ('latitude', models.CharField(
                    blank=True, max_length=1000, null=True)),
                ('longitude', models.CharField(
                    blank=True, max_length=1000, null=True)),
                ('ubigeo', models.UUIDField(
                    blank=True, db_column='ubigeo_id', null=True)),
                ('legal_person', models.UUIDField(
                    blank=True, db_column='legal_person_id', null=True)),
                ('area_desempenio', models.UUIDField(
                    blank=True, db_column='area_desempenio_id', null=True)),
                ('entity', models.ForeignKey(blank=True, db_column='entity_id', null=True,
                                             on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.Entidad')),
            ],
            options={
                'verbose_name_plural': 'hierarchys',
                'verbose_name': 'hierarchy',
            },
        ),
        migrations.CreateModel(
            name='HierarchyType',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=60)),
                ('state', models.CharField(blank=True, max_length=10, null=True)),
                ('connector', models.CharField(blank=True, max_length=30, null=True)),
                ('abbreviation', models.CharField(
                    blank=True, max_length=10, null=True)),
                ('code_hierarchy_type', models.CharField(
                    blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name_plural': 'hierarchy types',
                'verbose_name': 'hierarchy type',
                'db_table': 'auth_xe_hierarchy_type',
            },
        ),
        migrations.CreateModel(
            name='Sucursal',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4,
                                        editable=False, primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=300)),
                ('referencia', models.CharField(max_length=300)),
                ('latitud', models.CharField(max_length=500)),
                ('longitud', models.CharField(max_length=500)),
                ('estado', models.CharField(blank=True, max_length=2, null=True)),
                ('tipo_sucursal', models.UUIDField(
                    blank=True, db_column='tipo_sucursal_id', null=True)),
                ('ubigeo', models.UUIDField(
                    blank=True, db_column='ubigeo_id', null=True)),
            ],
            options={
                'verbose_name_plural': 'sucursal',
                'verbose_name': 'sucursal',
                'db_table': 'auth_xe_sucursal',
            },
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='hierarchy_type',
            field=models.ForeignKey(db_column='hierarchy_type_id',
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.HierarchyType'),
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='parent',
            field=models.ForeignKey(blank=True, db_column='parent_id', null=True, on_delete=django.db.models.deletion.PROTECT,
                                    related_name='childrens', to='believe_his_prophets.Hierarchy'),
        ),
        migrations.AddField(
            model_name='hierarchy',
            name='sucursal',
            field=models.ForeignKey(blank=True, db_column='sucursal_id', null=True,
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.Sucursal'),
        ),
        migrations.AddField(
            model_name='entidad',
            name='hierarchy_type',
            field=models.ForeignKey(db_column='hierarchy_type_id',
                                    on_delete=django.db.models.deletion.PROTECT, to='believe_his_prophets.HierarchyType'),
        ),
    ]

# Generated by Django 2.0.9 on 2018-10-21 04:27