# Generated by Django 2.2.1 on 2019-09-18 15:55

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import enumchoicefield.fields
import iotrec_api.utils.thing
import mptt.fields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('iotrec_api', '0003_user_preferences'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContextFactor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='contextFactor', max_length=128)),
                ('display_title', models.CharField(default='Context Factor', max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='ContextFactorValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='factorValue', max_length=128)),
                ('display_title', models.CharField(default='Factor Value', max_length=128)),
                ('description', models.CharField(default='Factor Value Description', max_length=255)),
                ('context_factor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='values', to='training.ContextFactor')),
            ],
        ),
        migrations.CreateModel(
            name='ReferenceThing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='New Thing', max_length=128)),
                ('description', models.TextField(blank=True)),
                ('type', enumchoicefield.fields.EnumChoiceField(default=iotrec_api.utils.thing.ThingType(1), enum_class=iotrec_api.utils.thing.ThingType, max_length=8)),
                ('image', models.ImageField(blank=True, upload_to='')),
                ('indoorsLocation', models.BooleanField(default=True)),
                ('categories', mptt.fields.TreeManyToManyField(blank=True, to='iotrec_api.Category')),
            ],
        ),
        migrations.CreateModel(
            name='TrainingUser',
            fields=[
                ('identifier', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Sample',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(-1), django.core.validators.MaxValueValidator(1)])),
                ('context_factor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.ContextFactor')),
                ('context_factor_value', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.ContextFactorValue')),
                ('thing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.ReferenceThing')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.TrainingUser')),
            ],
        ),
    ]
