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

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


class Migration(migrations.Migration):

    dependencies = [
        ('trainings', '0013_training_trainer_groups_help_text'),
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0009_add_assessments_stuff'),
        ('sync', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AssessableActivityPartUserScore',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('score', models.IntegerField()),
                ('activity_part_id', django_extensions.db.fields.UUIDField(blank=True, editable=False)),
                ('points', models.IntegerField(blank=True, null=True)),
                ('activity_part_type', models.ForeignKey(related_name='scores_on', to='contenttypes.ContentType')),
                ('first_update', models.ForeignKey(blank=True, related_name='assessableactivitypartuserscore_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='assessableactivitypartuserscore_by_last', null=True, to='sync.Update')),
                ('session', models.ForeignKey(to='trainings.TrainingSession')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'activity part scores',
                'verbose_name': 'activity part score',
            },
        ),
        migrations.CreateModel(
            name='CertificationCompetencyThreshold',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('threshold', models.PositiveIntegerField(default=0, help_text='How many points must a trainee collect to acquire this status?')),
            ],
            options={
                'verbose_name_plural': 'certification competency thresholds',
                'verbose_name': 'certification competency threshold',
            },
        ),
        migrations.CreateModel(
            name='CertificationProgram',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255)),
                ('first_update', models.ForeignKey(blank=True, related_name='certificationprogram_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='certificationprogram_by_last', null=True, to='sync.Update')),
            ],
            options={
                'verbose_name_plural': 'certification programs',
                'verbose_name': 'certification program',
            },
        ),
        migrations.CreateModel(
            name='CertificationProgramUserStatus',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('first_update', models.ForeignKey(blank=True, related_name='certificationprogramuserstatus_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='certificationprogramuserstatus_by_last', null=True, to='sync.Update')),
                ('program', models.ForeignKey(blank=True, null=True, to='assessments.CertificationProgram')),
            ],
            options={
                'verbose_name_plural': 'certification program statuses',
                'verbose_name': 'certification program status',
            },
        ),
        migrations.CreateModel(
            name='CertificationStatus',
            fields=[
                ('sort_order', models.IntegerField(blank=True, db_index=True)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255)),
                ('first_update', models.ForeignKey(blank=True, related_name='certificationstatus_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='certificationstatus_by_last', null=True, to='sync.Update')),
                ('program', models.ForeignKey(related_name='statuses', to='assessments.CertificationProgram')),
            ],
            options={
                'verbose_name_plural': 'certification statuses',
                'verbose_name': 'certification status',
            },
        ),
        migrations.CreateModel(
            name='Competency',
            fields=[
                ('sort_order', models.IntegerField(blank=True, db_index=True)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('name', models.CharField(unique=True, max_length=255)),
                ('code', models.CharField(unique=True, max_length=255)),
                ('description', models.TextField(blank=True)),
                ('is_ghost', models.BooleanField(default=False)),
                ('first_update', models.ForeignKey(blank=True, related_name='competency_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='competency_by_last', null=True, to='sync.Update')),
            ],
            options={
                'verbose_name_plural': 'competencies',
                'verbose_name': 'competency',
            },
        ),
        migrations.CreateModel(
            name='CompetencyTree',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255)),
                ('first_update', models.ForeignKey(blank=True, related_name='competencytree_by_first', null=True, to='sync.Update')),
                ('job_profile', models.OneToOneField(blank=True, null=True, to='accounts.Group')),
                ('last_update', models.ForeignKey(blank=True, related_name='competencytree_by_last', null=True, to='sync.Update')),
            ],
            options={
                'verbose_name_plural': 'competency trees',
                'verbose_name': 'competency tree',
            },
        ),
        migrations.CreateModel(
            name='CompetencyTreeUserScore',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('score', models.IntegerField()),
                ('first_update', models.ForeignKey(blank=True, related_name='competencytreeuserscore_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='competencytreeuserscore_by_last', null=True, to='sync.Update')),
                ('session', models.ForeignKey(to='trainings.TrainingSession')),
                ('tree', models.ForeignKey(related_name='user_scores', to='assessments.CompetencyTree')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'competency tree scores',
                'verbose_name': 'competency tree score',
            },
        ),
        migrations.CreateModel(
            name='CompetencyUserScore',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('score', models.IntegerField()),
                ('competency', models.ForeignKey(related_name='user_scores', to='assessments.Competency')),
                ('first_update', models.ForeignKey(blank=True, related_name='competencyuserscore_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='competencyuserscore_by_last', null=True, to='sync.Update')),
                ('session', models.ForeignKey(to='trainings.TrainingSession')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'competency scores',
                'verbose_name': 'competency score',
            },
        ),
        migrations.CreateModel(
            name='Dimension',
            fields=[
                ('sort_order', models.IntegerField(blank=True, db_index=True)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('name', models.CharField(unique=True, max_length=255)),
                ('code', models.CharField(unique=True, max_length=255)),
                ('description', models.TextField(blank=True)),
                ('default_weight', models.PositiveIntegerField(default=1)),
                ('competency', models.ForeignKey(related_name='dimensions', to='assessments.Competency')),
                ('first_update', models.ForeignKey(blank=True, related_name='dimension_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='dimension_by_last', null=True, to='sync.Update')),
            ],
            options={
                'verbose_name_plural': 'dimensions',
                'verbose_name': 'dimension',
            },
        ),
        migrations.CreateModel(
            name='DimensionTrainingWeight',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('weight', models.PositiveIntegerField(blank=True, null=True)),
                ('dimension', models.ForeignKey(to='assessments.Dimension')),
                ('first_update', models.ForeignKey(blank=True, related_name='dimensiontrainingweight_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='dimensiontrainingweight_by_last', null=True, to='sync.Update')),
                ('training', models.ForeignKey(to='trainings.Training')),
            ],
            options={
                'verbose_name_plural': 'dimension training weights',
                'verbose_name': 'dimension training weight',
            },
        ),
        migrations.CreateModel(
            name='DimensionUserScore',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('score', models.IntegerField()),
                ('dimension', models.ForeignKey(related_name='user_scores', to='assessments.Dimension')),
                ('first_update', models.ForeignKey(blank=True, related_name='dimensionuserscore_by_first', null=True, to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, related_name='dimensionuserscore_by_last', null=True, to='sync.Update')),
                ('session', models.ForeignKey(to='trainings.TrainingSession')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'dimension scores',
                'verbose_name': 'dimension score',
            },
        ),
        migrations.AddField(
            model_name='competency',
            name='tree',
            field=models.ForeignKey(related_name='competencies', to='assessments.CompetencyTree'),
        ),
        migrations.AddField(
            model_name='certificationprogramuserstatus',
            name='status',
            field=models.ForeignKey(blank=True, null=True, to='assessments.CertificationStatus'),
        ),
        migrations.AddField(
            model_name='certificationprogramuserstatus',
            name='user',
            field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='certificationcompetencythreshold',
            name='competency',
            field=models.ForeignKey(to='assessments.Competency'),
        ),
        migrations.AddField(
            model_name='certificationcompetencythreshold',
            name='first_update',
            field=models.ForeignKey(blank=True, related_name='certificationcompetencythreshold_by_first', null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='certificationcompetencythreshold',
            name='last_update',
            field=models.ForeignKey(blank=True, related_name='certificationcompetencythreshold_by_last', null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='certificationcompetencythreshold',
            name='status',
            field=models.ForeignKey(to='assessments.CertificationStatus'),
        ),
    ]
