# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-20 04:14
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActaEntrada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('imagen', models.ImageField(blank=True, null=True, upload_to='actas_entrada')),
                ('descripcion', models.TextField(max_length=500)),
            ],
            options={
                'verbose_name': 'Acta de entrada',
                'verbose_name_plural': 'Actas de entradas',
            },
        ),
        migrations.CreateModel(
            name='ActaRequisicion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now=True)),
                ('descripcion', models.TextField(max_length=500)),
            ],
            options={
                'verbose_name': 'Acta de requisici\xf3n',
                'verbose_name_plural': 'Actas de requisici\xf3n',
            },
        ),
        migrations.CreateModel(
            name='ActaSalida',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now=True)),
                ('archivo', models.FileField(blank=True, null=True, upload_to='actas_salida', verbose_name='Acta')),
                ('descripcion', models.TextField(max_length=500)),
            ],
            options={
                'verbose_name': 'Acta de salida',
                'verbose_name_plural': 'Actas de salidas',
            },
        ),
        migrations.CreateModel(
            name='Activo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('serial', models.CharField(max_length=60)),
                ('alias', models.CharField(max_length=60)),
                ('potencia', models.CharField(max_length=60)),
                ('activado', models.BooleanField(default=True)),
                ('instalado', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Articulo Serial',
                'verbose_name_plural': 'Articulos Seriales',
            },
        ),
        migrations.CreateModel(
            name='ActivoNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
            ],
            options={
                'verbose_name': 'Articulo no serial',
                'verbose_name_plural': 'Articulos no seriales',
            },
        ),
        migrations.CreateModel(
            name='Articulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
                ('descripcion', models.TextField(max_length=500)),
                ('cantidad_minima_en_bodega', models.IntegerField()),
                ('cantidad_minima_de_compra', models.IntegerField()),
                ('fecha_creacion', models.DateTimeField(auto_now=True)),
                ('imagen', models.ImageField(blank=True, null=True, upload_to='articulos')),
                ('tiempo_entrega', models.IntegerField(verbose_name='Tiempo de entrega(Dias)')),
                ('activado', models.BooleanField(default=True)),
                ('precio', models.DecimalField(decimal_places=2, max_digits=19)),
            ],
            options={
                'verbose_name': 'Creaci\xf3n de articulo serial',
                'verbose_name_plural': 'Creaci\xf3n de articulo serial',
            },
        ),
        migrations.CreateModel(
            name='ArticuloNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
                ('descripcion', models.TextField(max_length=500)),
                ('cantidad_minima_en_bodega', models.IntegerField()),
                ('cantidad_minima_de_compra', models.IntegerField()),
                ('activado', models.BooleanField(default=True)),
                ('imagen', models.ImageField(blank=True, null=True, upload_to='articulos')),
                ('unidad', models.CharField(max_length=10)),
                ('precio', models.DecimalField(decimal_places=2, max_digits=19)),
                ('fecha_creacion', models.DateTimeField(auto_now=True)),
                ('tiempo_entrega', models.IntegerField(verbose_name='Tiempo de entrega(Dias)')),
            ],
            options={
                'verbose_name': 'Creaci\xf3n de articulo no serial',
                'verbose_name_plural': 'Creaci\xf3n de articulos no serial',
            },
        ),
        migrations.CreateModel(
            name='Bodega',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identi', models.CharField(max_length=45, verbose_name='Identificaci\xf3n')),
                ('nombre', models.CharField(max_length=45)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Central',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bodega', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega')),
            ],
            options={
                'verbose_name': 'Central',
                'verbose_name_plural': 'Centrales',
            },
        ),
        migrations.CreateModel(
            name='Cuenta',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('bodega', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega')),
            ],
            options={
                'verbose_name': 'Cuenta',
                'verbose_name_plural': 'Cuentas',
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Custodio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identi', models.CharField(max_length=45, verbose_name='Identificaci\xf3n')),
                ('nombre', models.CharField(max_length=45)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=10)),
                ('correo', models.CharField(max_length=45)),
            ],
        ),
        migrations.CreateModel(
            name='EntradaNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
            ],
            options={
                'verbose_name': 'Activo no serial',
                'verbose_name_plural': 'Activos no seriales',
            },
        ),
        migrations.CreateModel(
            name='Fabricante',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='logo')),
                ('fecha', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='LogArticulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now=True)),
                ('cantidad', models.IntegerField()),
                ('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Articulo')),
                ('bodega', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega')),
            ],
            options={
                'verbose_name': 'Log de articulo',
                'verbose_name_plural': 'Logs de articulos',
            },
        ),
        migrations.CreateModel(
            name='LogNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('cantidad', models.IntegerField()),
                ('activo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActivoNoSerial')),
                ('bodega', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega')),
            ],
            options={
                'verbose_name': 'Log no serial',
                'verbose_name_plural': 'Logs no seriales',
            },
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='logo')),
                ('fecha', models.DateField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Proveedor',
                'verbose_name_plural': 'Provedores',
            },
        ),
        migrations.CreateModel(
            name='RequisicionArticulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('acta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActaRequisicion')),
                ('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Articulo')),
            ],
            options={
                'verbose_name': 'Activo',
                'verbose_name_plural': 'Activos',
            },
        ),
        migrations.CreateModel(
            name='RequisicionNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('acta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActaRequisicion')),
                ('activo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ArticuloNoSerial')),
            ],
            options={
                'verbose_name': 'Activo no serial',
                'verbose_name_plural': 'Activos no seriales',
            },
        ),
        migrations.CreateModel(
            name='SalidaNoSerial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('fecha', models.DateField(auto_now_add=True)),
                ('acta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActaSalida')),
                ('activo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActivoNoSerial')),
            ],
            options={
                'verbose_name': 'Salida no serial',
                'verbose_name_plural': 'Salidas no seriales',
            },
        ),
        migrations.CreateModel(
            name='TipoActivo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('unidad', models.CharField(max_length=200)),
                ('marker', models.ImageField(blank=True, null=True, upload_to='marker', verbose_name='Marcador')),
                ('marker_2', models.ImageField(blank=True, null=True, upload_to='marker2', verbose_name='Marcador seleccionado')),
            ],
            options={
                'verbose_name': 'Tipo de Activo',
                'verbose_name_plural': 'Tipos de Activos',
            },
        ),
        migrations.CreateModel(
            name='TrazabilidadActivo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('mensage', models.CharField(max_length=150, verbose_name='Mensaje')),
                ('activo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Activo')),
                ('bodega', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega')),
            ],
        ),
        migrations.CreateModel(
            name='Compra',
            fields=[
                ('actaentrada_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='inventario.ActaEntrada')),
                ('creado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Cuenta')),
            ],
            bases=('inventario.actaentrada',),
        ),
        migrations.AddField(
            model_name='entradanoserial',
            name='acta',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActaEntrada'),
        ),
        migrations.AddField(
            model_name='entradanoserial',
            name='activo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ActivoNoSerial'),
        ),
        migrations.AddField(
            model_name='articulonoserial',
            name='fabricante',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Fabricante'),
        ),
        migrations.AddField(
            model_name='articulo',
            name='fabricante',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Fabricante'),
        ),
        migrations.AddField(
            model_name='activonoserial',
            name='articulo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.ArticuloNoSerial'),
        ),
        migrations.AddField(
            model_name='activonoserial',
            name='bodega',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='activo',
            name='articulo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Articulo'),
        ),
        migrations.AddField(
            model_name='activo',
            name='bodega',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='activo',
            name='tipo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.TipoActivo'),
        ),
        migrations.AddField(
            model_name='actasalida',
            name='activos',
            field=models.ManyToManyField(blank=True, to='inventario.Activo'),
        ),
        migrations.AddField(
            model_name='actasalida',
            name='creado_por',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Cuenta'),
        ),
        migrations.AddField(
            model_name='actasalida',
            name='custodio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Custodio'),
        ),
        migrations.AddField(
            model_name='actasalida',
            name='destino',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='destino', to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='actasalida',
            name='salida',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='salida', to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='actarequisicion',
            name='bodega',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='actarequisicion',
            name='central',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Central'),
        ),
        migrations.AddField(
            model_name='actaentrada',
            name='activos',
            field=models.ManyToManyField(blank=True, to='inventario.Activo'),
        ),
        migrations.AddField(
            model_name='actaentrada',
            name='custodio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.Custodio'),
        ),
        migrations.AddField(
            model_name='actaentrada',
            name='destino',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='destino_', to='inventario.Bodega'),
        ),
        migrations.AddField(
            model_name='actaentrada',
            name='origen',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='origen_', to='inventario.Bodega'),
        ),
    ]
