# Generated by Django 2.1.5 on 2019-04-08 20:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Deliver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DeliverItems',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Cantidad')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('title', models.CharField(max_length=128, verbose_name='Producto')),
                ('observations', models.TextField(blank=True, null=True, verbose_name='Observaciones')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
            ],
            options={
                'verbose_name_plural': 'Productos',
                'verbose_name': 'Producto',
            },
        ),
        migrations.CreateModel(
            name='Production',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('sell_amount', models.FloatField(verbose_name='Precio de venta')),
                ('produccion_amount', models.FloatField(verbose_name='Precio de venta')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductionItems',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Cantidad')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Product', verbose_name='Producto')),
                ('production', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Production')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('amount', models.FloatField(verbose_name='Precio de venta')),
                ('deprecated', models.BooleanField(default=False, help_text='Solo puede haber 1 precio por producto, si activa este, los otros se desactivan.', verbose_name='Activo')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
                ('sell', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Product', verbose_name='Venta')),
            ],
            options={
                'verbose_name_plural': 'Precios de Productos',
                'verbose_name': 'Precio de Producto',
            },
        ),
        migrations.CreateModel(
            name='RowMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('title', models.CharField(max_length=128, verbose_name='Producto')),
                ('observations', models.TextField(blank=True, null=True, verbose_name='Observaciones')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
            ],
            options={
                'verbose_name_plural': 'Materias Primas',
                'verbose_name': 'Materia Prima',
            },
        ),
        migrations.CreateModel(
            name='RowMaterialItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Cantidad')),
                ('production', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Production')),
            ],
        ),
        migrations.CreateModel(
            name='RowMaterialPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('last_modification_date', models.DateTimeField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('amount', models.FloatField(verbose_name='Precio de venta')),
                ('deprecated', models.FloatField(default=False, help_text='Solo puede haber 1 precio por producto, si activa este, los otros se desactivan.', verbose_name='Activo')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Creador')),
                ('sell', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.RowMaterial', verbose_name='Venta')),
            ],
            options={
                'verbose_name_plural': 'Precios de la Materia Prima',
                'verbose_name': 'Precio de la Materia Prima',
            },
        ),
        migrations.AddField(
            model_name='deliveritems',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Product', verbose_name='Producto'),
        ),
        migrations.AddField(
            model_name='deliveritems',
            name='production',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='production.Production'),
        ),
    ]
