# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-05 20:25
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('servicio', '0001_initial'),
        ('persona', '0001_initial'),
        ('rubro', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Equipo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deleted', models.DateTimeField(editable=False, null=True)),
                ('nro_serie', models.IntegerField(unique=True)),
                ('descripcion', models.CharField(max_length=250)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Orden',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deleted', models.DateTimeField(editable=False, null=True)),
                ('descripcion', models.TextField(blank=True, null=True)),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
                ('fecha_fin', models.DateTimeField(blank=True, null=True)),
                ('cerrada', models.BooleanField(default=False)),
                ('cancelada', models.BooleanField(default=False)),
                ('precio_final', models.DecimalField(decimal_places=2, default=Decimal('0'), max_digits=10)),
                ('cliente', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordenes', to='persona.Cliente')),
                ('equipo', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordenes', to='orden.Equipo')),
                ('rubro', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ordenes', to='rubro.Rubro')),
                ('tecnico', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordenes', to='persona.Tecnico')),
                ('tipo_servicio', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordenes', to='servicio.TipoServicio')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
