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

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


class Migration(migrations.Migration):
    dependencies = [
        ('panelists', '__first__'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('samples', '__first__'),
        ('devices', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Measurement',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
                ('is_active', models.BooleanField(editable=False, default=True)),
                ('presentation_time', models.IntegerField(verbose_name='presentation time')),
                ('standard_identifier', models.IntegerField(default=0)),
                ('temperature', models.FloatField()),
                ('used_method', models.IntegerField(verbose_name='method',
                                                    choices=[(1, 'Yes/No'), (2, 'Forced Choice'), (3, 'Intensity'),
                                                             (4, 'Hedonic tone'), (5, '3-Forced Choice')], default=1)),
                ('location', models.CharField(max_length=255)),
                ('result', models.FloatField(null=True, verbose_name='team ite', blank=True)),
                ('compliant_result', models.BooleanField(default=False)),
                ('finished_at', models.DateTimeField(null=True, verbose_name='finished at', blank=True)),
                ('calibration', models.ForeignKey(related_name='+', to='devices.Calibration')),
                ('olfactometer', models.ForeignKey(related_name='+', to='devices.Olfactometer')),
                ('sample', models.ForeignKey(related_name='measurements', to='samples.Sample')),
            ],
            options={
                'verbose_name_plural': 'measurements',
                'verbose_name': 'measurement',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='MeasurementRound',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
                ('is_active', models.BooleanField(editable=False, default=True)),
                ('started_at', models.DateTimeField(verbose_name='start of round')),
                ('finished_at', models.DateTimeField(verbose_name='end of round')),
                ('is_included', models.BooleanField(default=True)),
                ('number', models.SmallIntegerField(verbose_name='number')),
                ('comments', models.TextField(verbose_name='comments', max_length=1023, blank=True)),
                ('series', models.CharField(verbose_name='dilution series', max_length=255)),
                ('measurement', models.ForeignKey(related_name='rounds', to='measurements.Measurement')),
                ('operator', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'rounds',
                'verbose_name': 'round',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='SingleRoundResult',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
                ('is_active', models.BooleanField(editable=False, default=True)),
                ('replies', models.CharField(max_length=2047, blank=True)),
                ('valid', models.BooleanField(default=True)),
                ('ite', models.FloatField(null=True, blank=True)),
                ('delta_z', models.FloatField(null=True, blank=True)),
                ('blank_error_percentage', models.FloatField(null=True, default=0.0, blank=True)),
                ('panelist', models.ForeignKey(to='panelists.Panelist')),
                ('round', models.ForeignKey(related_name='results', to='measurements.MeasurementRound')),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model,),
        ),
    ]
