# Generated by Django 2.2.13 on 2020-06-10 00:44

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='Equipo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('estado', models.CharField(choices=[('A', 'Activo'), ('I', 'Inactivo')], max_length=1)),
                ('ultima_modificacion', models.DateTimeField(auto_now=True)),
                ('nombre', models.CharField(max_length=100)),
                ('codigo', models.CharField(max_length=100)),
                ('temperatura_minima', models.DecimalField(decimal_places=2, max_digits=7)),
                ('temperatura_maxima', models.DecimalField(decimal_places=2, max_digits=7)),
            ],
            options={
                'verbose_name': 'equipo',
                'verbose_name_plural': 'equipos',
            },
        ),
        migrations.CreateModel(
            name='RegistroTemperatura',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_registro', models.DateTimeField()),
                ('temperatura', models.DecimalField(decimal_places=3, max_digits=7)),
                ('unidad', models.CharField(choices=[('C', 'Celsius'), ('F', 'Farhenheit')], max_length=1)),
                ('observaciones', models.TextField()),
                ('equipo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registros', to='equipos.Equipo')),
                ('registrado_por', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'registro de temperatura',
                'verbose_name_plural': 'registros de temperatura',
                'ordering': ['-fecha_registro'],
            },
        ),
    ]
