# Generated by Django 2.1 on 2021-06-26 00:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Articulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=100, unique=True)),
                ('stock', models.IntegerField(default=0, verbose_name='Stock')),
                ('unidadMedida', models.CharField(choices=[('Pieza', 'Pieza'), ('Metro', 'Metro'), ('Litro', 'Litro'), ('Galón', 'Galón'), ('Caneca', 'Caneca'), ('Libra', 'Libra'), ('kilogramo', 'Kilogramo'), ('Quintal', 'Quintal')], max_length=100)),
            ],
            options={
                'verbose_name': 'Articulo',
                'verbose_name_plural': 'Articulos',
                'ordering': ['descripcion'],
            },
        ),
        migrations.CreateModel(
            name='BodegaMaiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('tipoMovimiento', models.CharField(max_length=25)),
                ('cantidad', models.DecimalField(decimal_places=2, max_digits=7)),
                ('vigente', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=150, unique=True)),
                ('descripcion', models.CharField(blank=True, max_length=150, null=True, verbose_name='Descripción')),
            ],
            options={
                'verbose_name': 'Categoria',
                'verbose_name_plural': 'Categorias',
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='CompraMaiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaCompra', models.DateTimeField(auto_now_add=True)),
                ('fechaModificacion', models.DateTimeField(auto_now=True)),
                ('observacion', models.CharField(max_length=100)),
                ('humedad', models.IntegerField()),
                ('impureza', models.IntegerField()),
                ('valida', models.BooleanField(default=True)),
                ('pendiente', models.BooleanField(default=True)),
                ('total', models.DecimalField(decimal_places=2, max_digits=7)),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='DetalleIngresoArticulos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('idArticulo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Articulo')),
            ],
        ),
        migrations.CreateModel(
            name='DetalleSalidaArticulos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('idArticulo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Articulo')),
            ],
        ),
        migrations.CreateModel(
            name='DocumentoCompra',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipoDocumento', models.CharField(max_length=25)),
                ('numeroDocumento', models.CharField(max_length=12)),
                ('fechaEmision', models.DateField()),
                ('cantidad', models.DecimalField(decimal_places=2, max_digits=7)),
                ('preciounitario', models.DecimalField(decimal_places=2, max_digits=4)),
                ('precioTotal', models.DecimalField(decimal_places=2, max_digits=8)),
            ],
        ),
        migrations.CreateModel(
            name='Empleado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identificacion', models.CharField(max_length=10, unique=True)),
                ('nombres', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=100)),
                ('correo', models.EmailField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Empresa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ruc', models.CharField(max_length=13, unique=True)),
                ('razonSocial', models.CharField(max_length=150)),
                ('direccion', models.CharField(max_length=250)),
                ('telefono', models.CharField(max_length=10)),
                ('correo', models.EmailField(blank=True, max_length=100, null=True)),
            ],
            options={
                'verbose_name': 'Empresa',
                'verbose_name_plural': 'Empresas',
                'ordering': ['razonSocial'],
            },
        ),
        migrations.CreateModel(
            name='FacturaTransporte',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numerofactura', models.CharField(max_length=12)),
                ('fechaEmision', models.DateField()),
                ('cantidad', models.DecimalField(decimal_places=2, max_digits=7)),
                ('preciounitario', models.DecimalField(decimal_places=2, max_digits=4)),
                ('precioTotal', models.DecimalField(decimal_places=2, max_digits=8)),
            ],
            options={
                'verbose_name': 'facturaTransporte',
                'verbose_name_plural': 'facturasTransporte',
                'ordering': ['fechaEmision'],
            },
        ),
        migrations.CreateModel(
            name='FacturaVenta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numeroFactura', models.CharField(max_length=12)),
                ('fechaEmision', models.DateField()),
                ('cantidad', models.DecimalField(decimal_places=2, max_digits=7)),
                ('preciounitario', models.DecimalField(decimal_places=2, max_digits=4)),
                ('precioTotal', models.DecimalField(decimal_places=2, max_digits=8)),
                ('idEmpresa', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Empresa')),
            ],
            options={
                'verbose_name': 'facturaVenta',
                'verbose_name_plural': 'facturasVenta',
                'ordering': ['fechaEmision'],
            },
        ),
        migrations.CreateModel(
            name='IngresoArticulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(default=datetime.datetime.now)),
            ],
        ),
        migrations.CreateModel(
            name='PesajeCompraMaiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaPesaje', models.DateTimeField()),
                ('pesoBruto', models.IntegerField()),
                ('pesoTara', models.IntegerField()),
                ('pesoNeto', models.IntegerField()),
                ('factorConversion', models.DecimalField(decimal_places=2, max_digits=4)),
                ('pesoQuintales', models.DecimalField(decimal_places=2, max_digits=7)),
                ('vigente', models.BooleanField(default=True)),
                ('idCompraMaiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.CompraMaiz')),
            ],
            options={
                'verbose_name': 'PesajeCompraMaiz',
                'verbose_name_plural': 'PesajeCompraMaiz',
                'ordering': ['fechaPesaje'],
            },
        ),
        migrations.CreateModel(
            name='PesajeVentaMaiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaPesaje', models.DateField()),
                ('pesoBruto', models.IntegerField()),
                ('pesoTara', models.IntegerField()),
                ('pesoNeto', models.IntegerField()),
                ('factorConversion', models.DecimalField(decimal_places=2, max_digits=4)),
                ('pesoQuintales', models.DecimalField(decimal_places=2, max_digits=7)),
                ('vigente', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'PesajeVentaMaiz',
                'verbose_name_plural': 'PesajeVentaMaiz',
                'ordering': ['fechaPesaje'],
            },
        ),
        migrations.CreateModel(
            name='Productor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identificacion', models.CharField(max_length=10, unique=True)),
                ('nombres', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=10)),
                ('correo', models.EmailField(blank=True, max_length=100, null=True)),
            ],
            options={
                'verbose_name': 'Productor',
                'verbose_name_plural': 'Productores',
                'ordering': ['nombres'],
            },
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ruc', models.CharField(max_length=13, unique=True)),
                ('razonSocial', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=10)),
                ('correo', models.EmailField(blank=True, max_length=100, null=True)),
            ],
            options={
                'verbose_name': 'Proveedor',
                'verbose_name_plural': 'Proveedores',
            },
        ),
        migrations.CreateModel(
            name='ResponsableTransporte',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identificacion', models.CharField(max_length=10, unique=True)),
                ('nombre', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=10)),
                ('correo', models.EmailField(blank=True, max_length=100, null=True)),
                ('placaTrailer', models.CharField(max_length=10)),
            ],
            options={
                'verbose_name': 'Responsable Transporte',
                'verbose_name_plural': 'Responsables Transporte',
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='SalidaArticulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(default=datetime.datetime.now)),
                ('idEmpleado', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Empleado')),
            ],
        ),
        migrations.CreateModel(
            name='VentaMaiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaVenta', models.DateTimeField(auto_now_add=True)),
                ('fechaModificacion', models.DateTimeField(auto_now=True)),
                ('observaciones', models.CharField(max_length=100)),
                ('humedad', models.IntegerField()),
                ('impureza', models.IntegerField()),
                ('valida', models.BooleanField(default=True)),
                ('pendiente', models.BooleanField(default=True)),
                ('statusFactura', models.BooleanField(default=True)),
                ('total', models.DecimalField(decimal_places=2, max_digits=7)),
                ('idEmpresa', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Empresa')),
                ('idFacturaTransporte', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.FacturaTransporte')),
                ('idFacturaVenta', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.FacturaVenta')),
                ('idResponsableTransporte', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.ResponsableTransporte')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.AddField(
            model_name='pesajeventamaiz',
            name='idVentaMaiz',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.VentaMaiz'),
        ),
        migrations.AddField(
            model_name='ingresoarticulo',
            name='idProveedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Proveedor'),
        ),
        migrations.AddField(
            model_name='facturatransporte',
            name='idResponsableTransporte',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.ResponsableTransporte'),
        ),
        migrations.AddField(
            model_name='documentocompra',
            name='idProductor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Productor'),
        ),
        migrations.AddField(
            model_name='detallesalidaarticulos',
            name='idSalida',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.SalidaArticulo'),
        ),
        migrations.AddField(
            model_name='detalleingresoarticulos',
            name='idIngreso',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.IngresoArticulo'),
        ),
        migrations.AddField(
            model_name='compramaiz',
            name='idDocumentoCompra',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.DocumentoCompra'),
        ),
        migrations.AddField(
            model_name='compramaiz',
            name='idProductor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Productor'),
        ),
        migrations.AddField(
            model_name='bodegamaiz',
            name='idCompraMaiz',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.CompraMaiz'),
        ),
        migrations.AddField(
            model_name='bodegamaiz',
            name='idVentaMaiz',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.VentaMaiz'),
        ),
        migrations.AddField(
            model_name='articulo',
            name='idCategoria',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='app.Categoria'),
        ),
    ]
