# Generated by Django 2.0.4 on 2018-04-07 18:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Agencia',
            fields=[
                ('id', models.AutoField(db_column='IdAgencia', primary_key=True, serialize=False)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
                ('nombre', models.CharField(db_column='Nombre', max_length=200)),
                ('descripcion', models.TextField(blank=True, db_column='Descripcion', max_length=1000, null=True)),
                ('ciudad', models.CharField(blank=True, choices=[('UIO', 'Quito'), ('GYE', 'Guayaquil')], db_column='Ciudad', default='GYE', max_length=3)),
                ('place_id', models.CharField(db_column='IdLugar', max_length=30, null=True)),
            ],
            options={
                'db_table': 'dashboard_agencias',
            },
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(db_column='IdCliente', primary_key=True, serialize=False)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
                ('nombre', models.CharField(db_column='Nombre', max_length=200)),
                ('tipo_identificacion', models.CharField(choices=[('CED', 'Cedula'), ('PAS', 'Pasaporte'), ('RUC', 'R.U.C.')], db_column='TipoIdentificacion', default='CED', max_length=3)),
            ],
            options={
                'db_table': 'dashboard_clientes',
            },
        ),
        migrations.CreateModel(
            name='Empleado',
            fields=[
                ('id', models.AutoField(db_column='IdEmpleado', primary_key=True, serialize=False)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
                ('nombre', models.CharField(db_column='Nombre', max_length=200)),
            ],
            options={
                'db_table': 'dashboard_empleados',
            },
        ),
        migrations.CreateModel(
            name='Equipo',
            fields=[
                ('id', models.AutoField(db_column='IdEquipo', primary_key=True, serialize=False)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
                ('descripcion', models.CharField(db_column='Descripcion', max_length=200)),
            ],
            options={
                'db_table': 'dashboard_equipos',
            },
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(db_column='IdPlan', primary_key=True, serialize=False)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
                ('descripcion', models.CharField(db_column='Descripcion', max_length=200)),
            ],
            options={
                'db_table': 'dashboard_planes',
            },
        ),
        migrations.CreateModel(
            name='SocilicitudCompra',
            fields=[
                ('id', models.AutoField(db_column='IdSolicitudCompra', primary_key=True, serialize=False)),
                ('numero', models.CharField(db_column='Numero', max_length=10)),
                ('fecha_ingreso', models.DateTimeField(db_column='FechaIngreso')),
                ('estado', models.CharField(choices=[('001', 'ANULADA'), ('002', 'APROB. AUTOMAT 2DO NIVEL DE CREDITO'), ('003', 'APROB. CONDICIONAL'), ('004', 'APROBACION AUTOMATICA'), ('005', 'APROBADO'), ('006', 'CAMBIANDO INFORMACION'), ('007', 'EN NEGOCIACION'), ('008', 'EN REVISION'), ('009', 'EN VERIFICACION'), ('010', 'INGRESADA'), ('011', 'NEGADO'), ('012', 'NEGADO 2DO NIVEL DE CREDITO'), ('013', 'PENDIENTE DE ANALISIS'), ('014', 'POR CONFIRMAR PLAN')], db_column='Estado', default='010', max_length=3)),
                ('agencia', models.ForeignKey(db_column='IdAgencia', on_delete=django.db.models.deletion.PROTECT, to='dashboard.Agencia')),
                ('cliente', models.ForeignKey(db_column='IdCliente', on_delete=django.db.models.deletion.PROTECT, to='dashboard.Cliente')),
                ('equipo', models.ForeignKey(db_column='IdEquipo', on_delete=django.db.models.deletion.PROTECT, to='dashboard.Equipo')),
                ('plan', models.ForeignKey(db_column='IdPlan', on_delete=django.db.models.deletion.PROTECT, to='dashboard.Plan')),
                ('vendedor', models.ForeignKey(db_column='IdEmpleado', on_delete=django.db.models.deletion.PROTECT, to='dashboard.Empleado')),
            ],
            options={
                'db_table': 'dashboard_solicitudescompra',
            },
        ),
    ]
