# Generated by Django 3.1.3 on 2021-04-10 20:34

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Asig_recurso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_asig', models.DateField(default=datetime.datetime.now)),
                ('lote', models.CharField(max_length=100, unique=True)),
                ('estado', models.IntegerField(choices=[(0, 'ANULADA'), (1, 'EN PRODUCCION'), (2, 'FINALIZADA')], default=1)),
                ('inventariado', models.IntegerField(choices=[(0, 'NO'), (1, 'SI')], default=0)),
            ],
            options={
                'verbose_name': 'asig_recurso',
                'verbose_name_plural': 'asig_recursos',
                'db_table': 'asig_recurso',
            },
        ),
        migrations.CreateModel(
            name='Detalle_asig_maquina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'detalle_asig_maquina',
                'verbose_name_plural': 'detalle_asig_maquinas',
                'db_table': 'detalle_asig_maquina',
            },
        ),
        migrations.CreateModel(
            name='Detalle_asig_recurso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'detalle_asig_recurso',
                'verbose_name_plural': 'detalle_asig_recursos',
                'db_table': 'detalle_asig_recurso',
            },
        ),
        migrations.CreateModel(
            name='Detalle_perdidas_materiales',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField(default=1)),
            ],
            options={
                'verbose_name': 'detalle_perdidas_material',
                'verbose_name_plural': 'detalle_perdidas_materiales',
                'db_table': 'detalle_perdidas_material',
                'ordering': ['id', 'asignacion'],
            },
        ),
        migrations.CreateModel(
            name='Novedades',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(default=datetime.datetime.now)),
                ('asig_recurso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asignar_recursos.asig_recurso')),
                ('novedad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maquina.maquina')),
            ],
            options={
                'verbose_name': 'novedades_produccion',
                'verbose_name_plural': 'novedades_producciones',
                'db_table': 'novedades_produccion',
            },
        ),
        migrations.CreateModel(
            name='Detalle_produccion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.IntegerField(default=1)),
                ('asignacion', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='asignar_recursos.asig_recurso')),
            ],
            options={
                'verbose_name': 'detalle_produccion',
                'verbose_name_plural': 'detalle_producciones',
                'db_table': 'detalle_produccion',
                'ordering': ['id', 'asignacion'],
            },
        ),
    ]
