# Generated by Django 2.1.2 on 2018-12-05 05:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Almacen',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('almacen', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Categoria_Productos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('categoria', models.CharField(max_length=50)),
                ('descripcion_categoria', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Compras',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(auto_now_add=True)),
                ('sub_total', models.FloatField()),
                ('impuestos', models.FloatField()),
                ('total', models.FloatField()),
                ('fecha_entrega', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Compras_Detalle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.FloatField()),
                ('total_producto', models.FloatField()),
                ('compra', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Compras')),
            ],
        ),
        migrations.CreateModel(
            name='Corte',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('total_vendido', models.IntegerField()),
                ('total_comprado', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Detalle_Corte',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('producto', models.CharField(max_length=200)),
                ('cantidad', models.IntegerField()),
                ('total', models.FloatField()),
                ('iva', models.FloatField()),
                ('corte', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Corte')),
            ],
        ),
        migrations.CreateModel(
            name='Inventario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('existencias', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Movimientos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(max_length=255)),
                ('producto', models.CharField(max_length=200)),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('cantidad', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Productos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('descripcion', models.CharField(max_length=500)),
                ('unidad_medida', models.CharField(max_length=4)),
                ('inventario_minimo', models.FloatField()),
                ('inventario_maximo', models.FloatField()),
                ('imagen', models.BinaryField(blank=True)),
                ('precio', models.FloatField()),
                ('categoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Categoria_Productos')),
            ],
        ),
        migrations.CreateModel(
            name='Productos_Proveedores',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField()),
                ('costo_total', models.FloatField()),
                ('producto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Productos')),
            ],
        ),
        migrations.CreateModel(
            name='Proveedores_Clientes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre_comercial', models.CharField(max_length=255)),
                ('rfc', models.CharField(max_length=18)),
                ('direccion', models.CharField(max_length=255)),
                ('tipo', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Ventas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('sub_total', models.FloatField()),
                ('impuestos', models.FloatField()),
                ('total', models.FloatField()),
                ('cliente', models.ForeignKey(blank=True, default=None, on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Proveedores_Clientes')),
            ],
        ),
        migrations.CreateModel(
            name='Ventas_Detalle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.FloatField()),
                ('total_producto', models.FloatField()),
                ('producto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Productos')),
                ('venta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Ventas')),
            ],
        ),
        migrations.CreateModel(
            name='Zona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zona', models.CharField(max_length=255)),
                ('almacen', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Almacen')),
            ],
        ),
        migrations.AddField(
            model_name='productos_proveedores',
            name='proveedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Proveedores_Clientes'),
        ),
        migrations.AddField(
            model_name='movimientos',
            name='zona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Zona'),
        ),
        migrations.AddField(
            model_name='inventario',
            name='producto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Productos'),
        ),
        migrations.AddField(
            model_name='inventario',
            name='zona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Zona'),
        ),
        migrations.AddField(
            model_name='compras_detalle',
            name='producto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Productos'),
        ),
        migrations.AddField(
            model_name='compras',
            name='proveedor',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='sellpoint.Proveedores_Clientes'),
        ),
    ]
