# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-12-20 16:31
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('proveedores', '0001_initial'),
        ('items', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Operacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mantenimiento', models.CharField(choices=[('correctivo', 'Correctivo'), ('preventivo', 'Preventivo')], default='correctivo', max_length=50)),
                ('total', models.DecimalField(decimal_places=6, default=0.0, max_digits=15)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('observacion', models.TextField(blank=True)),
                ('activo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Activo')),
                ('proveedor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='proveedores.Proveedor')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SoporteMantenimiento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to=operaciones.models.upload_image_path)),
                ('operacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='operaciones.Operacion')),
            ],
        ),
    ]
