# Generated by Django 3.2.7 on 2021-11-04 22:46

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


class Migration(migrations.Migration):

    dependencies = [
        ('SuministrosFarmacia', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cotizaciones',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=250)),
                ('precio', models.FloatField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Existencias',
            fields=[
                ('codigo_producto', models.CharField(default='', max_length=10, primary_key=True, serialize=False)),
                ('descripcion', models.CharField(default='', max_length=250)),
                ('cantidad', models.IntegerField(default=0)),
                ('fecha_ingreso', models.DateField()),
                ('fecha_vencimiento', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Mejorprecio',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('precio_minimo', models.FloatField(default=0)),
                ('id_producto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SuministrosFarmacia.existencias')),
            ],
        ),
        migrations.CreateModel(
            name='Portafolio',
            fields=[
                ('codigo_producto', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=50)),
                ('descripcion', models.CharField(max_length=50)),
                ('precio', models.FloatField()),
                ('stock', models.BooleanField(blank=True, default=True, help_text='Disponible', null=True, verbose_name='Disponible')),
            ],
        ),
        migrations.DeleteModel(
            name='Productos',
        ),
        migrations.RemoveField(
            model_name='proveedores',
            name='codigo',
        ),
        migrations.RemoveField(
            model_name='proveedores',
            name='estado',
        ),
        migrations.RemoveField(
            model_name='proveedores',
            name='id',
        ),
        migrations.RemoveField(
            model_name='stock',
            name='apellidos',
        ),
        migrations.RemoveField(
            model_name='stock',
            name='cedula',
        ),
        migrations.RemoveField(
            model_name='stock',
            name='codigo',
        ),
        migrations.RemoveField(
            model_name='stock',
            name='direccion',
        ),
        migrations.RemoveField(
            model_name='stock',
            name='nombres',
        ),
        migrations.AddField(
            model_name='proveedores',
            name='codigo_empresa',
            field=models.CharField(default=0, max_length=10, primary_key=True, serialize=False),
        ),
        migrations.AddField(
            model_name='proveedores',
            name='email',
            field=models.EmailField(blank=True, default='', max_length=50),
        ),
        migrations.AddField(
            model_name='stock',
            name='descripcion',
            field=models.CharField(default='', max_length=250),
        ),
        migrations.AddField(
            model_name='stock',
            name='fecha_ingreso',
            field=models.DateField(default='2020-01-01'),
        ),
        migrations.AddField(
            model_name='stock',
            name='fecha_vencimiento',
            field=models.DateField(default='2020-01-01'),
        ),
        migrations.AddField(
            model_name='stock',
            name='stockmax',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='stock',
            name='stockmin',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='stock',
            name='stockrecomendado',
            field=models.IntegerField(default=0),
        ),
        migrations.AlterField(
            model_name='proveedores',
            name='direccion',
            field=models.CharField(default='', max_length=50),
        ),
        migrations.AlterField(
            model_name='proveedores',
            name='nombre',
            field=models.CharField(default='', max_length=50),
        ),
        migrations.AlterField(
            model_name='proveedores',
            name='telefono',
            field=models.CharField(default='', max_length=50),
        ),
        migrations.AlterField(
            model_name='stock',
            name='id',
            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
        migrations.AddField(
            model_name='portafolio',
            name='codigo_empresa',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='SuministrosFarmacia.proveedores'),
        ),
        migrations.AddField(
            model_name='mejorprecio',
            name='id_proveedor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SuministrosFarmacia.proveedores'),
        ),
        migrations.AddField(
            model_name='cotizaciones',
            name='id_producto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SuministrosFarmacia.existencias'),
        ),
        migrations.AddField(
            model_name='stock',
            name='id_producto',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='SuministrosFarmacia.existencias'),
        ),
    ]
