# Generated by Django 3.2.3 on 2021-06-02 17:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Caja',
            fields=[
                ('idCaja', models.IntegerField(primary_key=True, serialize=False, verbose_name='idCaja')),
                ('numeroCaja', models.IntegerField(verbose_name='Numero Caja')),
                ('nombreCaja', models.CharField(max_length=80, verbose_name='Nombre Caja')),
                ('efectivoInicial', models.FloatField(verbose_name='Efectivo Inicial')),
                ('estadoCaja', models.IntegerField(verbose_name='Estado Caja')),
            ],
            options={
                'verbose_name': 'Caja',
                'verbose_name_plural': 'Cajas',
            },
        ),
        migrations.CreateModel(
            name='CatalogoMarca',
            fields=[
                ('idMarca', models.IntegerField(primary_key=True, serialize=False, verbose_name='idMarca')),
                ('descripcion', models.CharField(max_length=150, verbose_name='Descripcion')),
                ('estado', models.IntegerField(verbose_name='Estado')),
                ('nombre', models.CharField(max_length=80, verbose_name='Nombre')),
            ],
            options={
                'verbose_name': 'CatalogoMarca',
                'verbose_name_plural': 'CatalogoMarcas',
            },
        ),
        migrations.CreateModel(
            name='ExistenciaBodega',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idExistenciaBodega', models.IntegerField(verbose_name='idExistenciaBodega')),
                ('cantidad', models.FloatField(verbose_name='cantidad')),
                ('fechaIngreso', models.DateField(verbose_name='Fecha Ingreso')),
                ('fechaCaducidad', models.DateField(verbose_name='Fecha Caducidad')),
                ('numeroFactura', models.IntegerField(verbose_name='Nummero Factura')),
                ('precioUnitario', models.FloatField(verbose_name='Precio Unitario')),
                ('realizadoPor', models.CharField(max_length=50, verbose_name='Realizado Por')),
                ('tipoIngreso', models.CharField(max_length=50, verbose_name='Tipo Ingreso')),
                ('descripcion', models.CharField(max_length=150, verbose_name='Descripcion')),
                ('catalogoMarca', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.catalogomarca')),
            ],
            options={
                'verbose_name': 'ExistenciaBodega',
                'verbose_name_plural': 'ExistenciaBodegas',
            },
        ),
        migrations.CreateModel(
            name='Farmacia',
            fields=[
                ('idFarmacia', models.IntegerField(primary_key=True, serialize=False, verbose_name='idFarmacia')),
                ('nombreFarmacia', models.CharField(max_length=80, verbose_name='Nombre Farmacia')),
                ('telefono', models.CharField(max_length=50, verbose_name='Telefono')),
                ('estado', models.IntegerField(verbose_name='Estado')),
                ('direccionFarmacia', models.CharField(max_length=150, verbose_name='Direccion Farmacia')),
                ('departamento', models.CharField(max_length=80, verbose_name='Departamento')),
                ('municipio', models.CharField(max_length=80, verbose_name='Municipio')),
            ],
            options={
                'verbose_name': 'Farmacia',
                'verbose_name_plural': 'Farmacias',
            },
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('idProveedor', models.IntegerField(primary_key=True, serialize=False, verbose_name='idProveedor')),
                ('estadoProveedor', models.IntegerField(verbose_name='Estado Proveedor')),
                ('numeroDocumento', models.CharField(max_length=80, verbose_name='Numero Documento')),
                ('nombre', models.CharField(max_length=80, verbose_name='Nombre')),
                ('direccionProveedor', models.CharField(max_length=150, verbose_name='Direccion Proveedor')),
                ('existenciaBodega', models.ManyToManyField(to='inventario.ExistenciaBodega', verbose_name='Enxistencias Bodega')),
            ],
            options={
                'verbose_name': 'Proveedor',
                'verbose_name_plural': 'Proveedores',
            },
        ),
        migrations.CreateModel(
            name='Rol',
            fields=[
                ('idRol', models.IntegerField(primary_key=True, serialize=False, verbose_name='idRol')),
                ('nombreRol', models.CharField(max_length=80, verbose_name='Nombre Rol')),
            ],
            options={
                'verbose_name': 'Rol',
                'verbose_name_plural': 'Rols',
            },
        ),
        migrations.CreateModel(
            name='TipoMovimiento',
            fields=[
                ('idTipoMovimiento', models.IntegerField(primary_key=True, serialize=False, verbose_name='idTipoMovimiento')),
                ('nombreTipoMovimiento', models.CharField(max_length=80, verbose_name='Nombre Tipo Movimiento')),
            ],
            options={
                'verbose_name': 'TipoMovimiento',
                'verbose_name_plural': 'TipoMovimientos',
            },
        ),
        migrations.CreateModel(
            name='TipoProducto',
            fields=[
                ('idTipo', models.IntegerField(primary_key=True, serialize=False, verbose_name='idTipo')),
                ('nombreTipo', models.CharField(max_length=150, verbose_name='Nombre Tipo')),
            ],
            options={
                'verbose_name': 'TipoProducto',
                'verbose_name_plural': 'TipoProductos',
            },
        ),
        migrations.CreateModel(
            name='UnidadDeMedida',
            fields=[
                ('idUnidad', models.IntegerField(primary_key=True, serialize=False, verbose_name='idUnidad')),
                ('nombreUnidad', models.CharField(max_length=80, verbose_name='Nombre Unidad')),
            ],
            options={
                'verbose_name': 'UnidadDeMedida',
                'verbose_name_plural': 'UnidadDeMedidas',
            },
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('idUsuario', models.IntegerField(primary_key=True, serialize=False, verbose_name='idUsuario')),
                ('nombre', models.CharField(max_length=80, verbose_name='Nombre')),
                ('apellido', models.CharField(max_length=80, verbose_name='Apellido')),
                ('correo', models.CharField(max_length=80, verbose_name='Correo')),
                ('password', models.CharField(max_length=256, verbose_name='Password')),
                ('estado', models.IntegerField(verbose_name='Estado')),
                ('farmacia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.farmacia')),
                ('rol', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='inventario.rol')),
            ],
            options={
                'verbose_name': 'Usuario',
                'verbose_name_plural': 'Usuarios',
            },
        ),
        migrations.CreateModel(
            name='tipoDocumento',
            fields=[
                ('idTipoDocumento', models.IntegerField(primary_key=True, serialize=False, verbose_name='idTipoDocumento')),
                ('nombreDocumento', models.CharField(max_length=30, verbose_name='nombreDocumento')),
                ('farmacia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.farmacia')),
                ('proveedor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.proveedor')),
            ],
            options={
                'verbose_name': 'Tipo Documento',
                'verbose_name_plural': 'Tipo Documentos',
            },
        ),
        migrations.CreateModel(
            name='SalidaBodega',
            fields=[
                ('idSalidadBodega', models.IntegerField(primary_key=True, serialize=False, verbose_name='idSalidadBodega')),
                ('cantidad', models.FloatField(verbose_name='Cantidad')),
                ('entregadoA', models.CharField(max_length=50, verbose_name='Entregado A')),
                ('observacion', models.CharField(max_length=50, verbose_name='Observacion')),
                ('realizadoPor', models.CharField(max_length=50, verbose_name='Realizado Por')),
                ('fechaSalida', models.DateField(verbose_name='Fecha Salida')),
                ('existenciaBodega', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.existenciabodega')),
                ('farmacia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.farmacia')),
            ],
            options={
                'verbose_name': 'SalidaBodega',
                'verbose_name_plural': 'SalidaBodegas',
            },
        ),
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('idProducto', models.IntegerField(primary_key=True, serialize=False, verbose_name='idProducto')),
                ('nombreProducto', models.CharField(max_length=80, verbose_name='Nombre Producto')),
                ('descripcion', models.CharField(max_length=150, verbose_name='Descripcion')),
                ('presentacion', models.CharField(max_length=80, verbose_name='Presentacion')),
                ('estado', models.IntegerField(verbose_name='Estado')),
                ('tipoProducto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.tipoproducto')),
                ('unidadMedida', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.unidaddemedida')),
            ],
            options={
                'verbose_name': 'Producto',
                'verbose_name_plural': 'Productos',
            },
        ),
        migrations.CreateModel(
            name='Movimiento',
            fields=[
                ('idMovimiento', models.IntegerField(primary_key=True, serialize=False, verbose_name='idMovimiento')),
                ('fecha', models.DateField(verbose_name='Fecha')),
                ('entradaAnterior', models.FloatField(verbose_name='Entrada Anterior')),
                ('cantidad', models.FloatField(verbose_name='Cantidad')),
                ('entradaActual', models.FloatField(verbose_name='Entrada Actual')),
                ('motivoMovimiento', models.CharField(max_length=256, verbose_name='Motivo')),
                ('caja', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.caja')),
                ('tipoMovimiento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.tipomovimiento')),
            ],
            options={
                'verbose_name': 'Movimiento',
                'verbose_name_plural': 'Movimientos',
            },
        ),
        migrations.AddField(
            model_name='existenciabodega',
            name='farmacia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.farmacia'),
        ),
        migrations.AddField(
            model_name='existenciabodega',
            name='producto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.producto'),
        ),
        migrations.AddField(
            model_name='caja',
            name='farmacia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventario.farmacia'),
        ),
    ]
