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

from django.db import models, migrations
from django.conf import settings
import django_extensions.db.fields
import mtp.apps.common.utils


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0001_initial'),
        ('trainings', '__first__'),
        ('workshops', '0001_initial'),
        ('sync', '0001_initial'),
        ('documents', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='EvaluationAxis',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('name', models.CharField(max_length=500)),
                ('order', models.PositiveIntegerField(db_index=True, default=0)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaNumeric',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('order', models.PositiveIntegerField(default=0)),
                ('description', models.CharField(max_length=500, verbose_name='description')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaNumericValue',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('value', models.PositiveIntegerField()),
                ('candidate', models.ForeignKey(related_name='ecnv_by_candidate', to=settings.AUTH_USER_MODEL)),
                ('evaluation_criteria_numeric', models.ForeignKey(to='evaluations.EvaluationCriteriaNumeric')),
                ('first_update', models.ForeignKey(related_name='evaluationcriterianumericvalue_by_first', blank=True, null=True, to='sync.Update')),
                ('jury', models.ForeignKey(related_name='ecnv_by_jury', to=settings.AUTH_USER_MODEL)),
                ('last_update', models.ForeignKey(related_name='evaluationcriterianumericvalue_by_last', blank=True, null=True, to='sync.Update')),
                ('training_session', models.ForeignKey(blank=True, null=True, to='trainings.TrainingSession')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaVerbatim',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('order', models.PositiveIntegerField(default=0)),
                ('description', models.CharField(max_length=500, verbose_name='description')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaVerbatimMod',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('order', models.PositiveIntegerField(default=0)),
                ('description', models.CharField(max_length=255, unique=True, verbose_name='description')),
                ('first_update', models.ForeignKey(related_name='evaluationcriteriaverbatimmod_by_first', blank=True, null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='evaluationcriteriaverbatimmod_by_last', blank=True, null=True, to='sync.Update')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaVerbatimValue',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('value', models.CharField(max_length=1000)),
                ('candidate', models.ForeignKey(related_name='ecvv_by_candidate', to=settings.AUTH_USER_MODEL)),
                ('evaluation_criteria_verbatim', models.ForeignKey(to='evaluations.EvaluationCriteriaVerbatim')),
                ('first_update', models.ForeignKey(related_name='evaluationcriteriaverbatimvalue_by_first', blank=True, null=True, to='sync.Update')),
                ('jury', models.ForeignKey(related_name='ecvv_by_jury', to=settings.AUTH_USER_MODEL)),
                ('last_update', models.ForeignKey(related_name='evaluationcriteriaverbatimvalue_by_last', blank=True, null=True, to='sync.Update')),
                ('training_session', models.ForeignKey(blank=True, null=True, to='trainings.TrainingSession')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationCriteriaVerbatimValueMod',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('value', models.CharField(max_length=1000)),
                ('candidate', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
                ('evaluation_criteria_verbatim_moderator', models.ForeignKey(to='evaluations.EvaluationCriteriaVerbatimMod')),
                ('evaluation_criteria_verbatim_value', models.ForeignKey(blank=True, null=True, unique=True, to='evaluations.EvaluationCriteriaVerbatimValue')),
                ('first_update', models.ForeignKey(related_name='evaluationcriteriaverbatimvaluemod_by_first', blank=True, null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='evaluationcriteriaverbatimvaluemod_by_last', blank=True, null=True, to='sync.Update')),
                ('training_session', models.ForeignKey(blank=True, null=True, to='trainings.TrainingSession')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationExercice',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('label', models.CharField(max_length=50, verbose_name='name')),
                ('preview', models.ImageField(upload_to=mtp.apps.common.utils.upload_to_generator, verbose_name='preview', blank=True, null=True)),
                ('start_range', models.PositiveIntegerField(default=1)),
                ('end_range', models.PositiveIntegerField(default=5)),
                ('step', models.PositiveIntegerField(default=1)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='EvaluationGraph',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('name', models.CharField(max_length=500)),
                ('step', models.PositiveIntegerField(default=1)),
                ('start_range', models.PositiveIntegerField(default=1)),
                ('end_range', models.PositiveIntegerField(default=5)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationGraphProperties',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('name', models.CharField(max_length=255, db_index=True, verbose_name='name')),
                ('master', models.BooleanField(default=False)),
                ('hidden', models.BooleanField(verbose_name='hidden', default=False)),
                ('order', models.PositiveIntegerField(db_index=True, blank=True, null=True)),
                ('evaluation_graph', models.ForeignKey(to='evaluations.EvaluationGraph')),
                ('first_update', models.ForeignKey(related_name='evaluationgraphproperties_by_first', blank=True, null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='evaluationgraphproperties_by_last', blank=True, null=True, to='sync.Update')),
                ('mgroups', models.ManyToManyField(to='accounts.Group')),
                ('user', models.ForeignKey(blank=True, null=True, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationType',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('name', models.CharField(max_length=255, db_index=True, verbose_name='name')),
                ('auto_evaluators', models.ForeignKey(related_name='evaluation_auto_evaluators', blank=True, null=True, to='accounts.Group')),
                ('auto_observers', models.ForeignKey(related_name='evaluation_auto_observer', blank=True, null=True, to='accounts.Group')),
                ('candidate', models.ForeignKey(related_name='evaluation_candidate', blank=True, null=True, to='accounts.Group')),
                ('evaluators', models.ForeignKey(related_name='evaluation_evaluators', blank=True, null=True, to='accounts.Group')),
                ('first_update', models.ForeignKey(related_name='evaluationtype_by_first', blank=True, null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='evaluationtype_by_last', blank=True, null=True, to='sync.Update')),
                ('moderators', models.ForeignKey(related_name='evaluation_moderator', blank=True, null=True, to='accounts.Group')),
                ('observers', models.ForeignKey(related_name='evaluation_observer', blank=True, null=True, to='accounts.Group')),
                ('original', models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationType')),
                ('preview', models.ForeignKey(blank=True, null=True, to='documents.DownloadableFile')),
                ('training', models.ForeignKey(to='trainings.Training')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EvaluationTypeProperties',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, editable=False, blank=True, serialize=False)),
                ('name', models.CharField(max_length=255, db_index=True, verbose_name='name')),
                ('master', models.BooleanField(default=False)),
                ('hidden', models.BooleanField(verbose_name='hidden', default=False)),
                ('order', models.PositiveIntegerField(db_index=True, default=0, blank=True, null=True)),
                ('evaluation_type', models.ForeignKey(to='evaluations.EvaluationType')),
                ('first_update', models.ForeignKey(related_name='evaluationtypeproperties_by_first', blank=True, null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='evaluationtypeproperties_by_last', blank=True, null=True, to='sync.Update')),
                ('mgroups', models.ManyToManyField(to='accounts.Group')),
                ('original', models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationTypeProperties')),
                ('user', models.ForeignKey(blank=True, null=True, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.AddField(
            model_name='evaluationgraph',
            name='evaluation_type',
            field=models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationType'),
        ),
        migrations.AddField(
            model_name='evaluationgraph',
            name='first_update',
            field=models.ForeignKey(related_name='evaluationgraph_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationgraph',
            name='last_update',
            field=models.ForeignKey(related_name='evaluationgraph_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationgraph',
            name='training',
            field=models.ForeignKey(blank=True, null=True, to='trainings.Training'),
        ),
        migrations.AddField(
            model_name='evaluationexercice',
            name='evaluation_type',
            field=models.ForeignKey(to='evaluations.EvaluationType'),
        ),
        migrations.AddField(
            model_name='evaluationexercice',
            name='first_update',
            field=models.ForeignKey(related_name='evaluationexercice_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationexercice',
            name='last_update',
            field=models.ForeignKey(related_name='evaluationexercice_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationexercice',
            name='original',
            field=models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationExercice'),
        ),
        migrations.AddField(
            model_name='evaluationcriteriaverbatim',
            name='exercice',
            field=models.ForeignKey(to='evaluations.EvaluationExercice'),
        ),
        migrations.AddField(
            model_name='evaluationcriteriaverbatim',
            name='first_update',
            field=models.ForeignKey(related_name='evaluationcriteriaverbatim_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationcriteriaverbatim',
            name='last_update',
            field=models.ForeignKey(related_name='evaluationcriteriaverbatim_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationcriteriaverbatim',
            name='original',
            field=models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationCriteriaVerbatim'),
        ),
        migrations.AddField(
            model_name='evaluationcriterianumeric',
            name='exercice',
            field=models.ForeignKey(to='evaluations.EvaluationExercice'),
        ),
        migrations.AddField(
            model_name='evaluationcriterianumeric',
            name='first_update',
            field=models.ForeignKey(related_name='evaluationcriterianumeric_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationcriterianumeric',
            name='last_update',
            field=models.ForeignKey(related_name='evaluationcriterianumeric_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationcriterianumeric',
            name='original',
            field=models.ForeignKey(blank=True, null=True, to='evaluations.EvaluationCriteriaNumeric'),
        ),
        migrations.AddField(
            model_name='evaluationaxis',
            name='criterias',
            field=models.ManyToManyField(to='evaluations.EvaluationCriteriaNumeric', blank=True),
        ),
        migrations.AddField(
            model_name='evaluationaxis',
            name='first_update',
            field=models.ForeignKey(related_name='evaluationaxis_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationaxis',
            name='last_update',
            field=models.ForeignKey(related_name='evaluationaxis_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='evaluationaxis',
            name='questions',
            field=models.ManyToManyField(to='workshops.WorkshopQuestion', blank=True),
        ),
        migrations.AddField(
            model_name='evaluationaxis',
            name='radar',
            field=models.ForeignKey(to='evaluations.EvaluationGraph'),
        ),
        migrations.AlterUniqueTogether(
            name='evaluationtypeproperties',
            unique_together=set([('user', 'evaluation_type')]),
        ),
    ]
