# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):
    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Calibration',
            fields=[
                ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
                ('is_active', models.BooleanField(editable=False, default=True)),
                ('json_data', models.TextField(editable=False)),
                ('valid_to', models.DateField(editable=False)),
                ('created_for', models.CharField(max_length=20, editable=False)),
                ('certificate',
                 models.FileField(verbose_name='certificate', null=True, upload_to='calib_certs', blank=True)),
            ],
            options={
                'verbose_name': 'calibration',
                'verbose_name_plural': 'calibrations',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Olfactometer',
            fields=[
                ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
                ('is_active', models.BooleanField(editable=False, default=True)),
                ('name', models.CharField(max_length=63)),
                ('inventory_number', models.CharField(max_length=127, blank=True)),
                ('serial_no', models.CharField(max_length=10, unique=True)),
                ('comment', models.TextField(max_length=1023, blank=True)),
                ('calibration',
                 models.ForeignKey(to='devices.Calibration', verbose_name='calibration', related_name='used_by')),
            ],
            options={
                'verbose_name': 'olfactometer',
                'verbose_name_plural': 'olfactometers',
            },
            bases=(models.Model,),
        ),
    ]
