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

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Workshop',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('first_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshop_by_first')),
                ('last_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshop_by_last')),
                ('original', models.ForeignKey(blank=True, to='workshops.Workshop', null=True)),
                ('preview', models.ForeignKey(blank=True, to='documents.DownloadableFile', null=True)),
                ('training', models.ForeignKey(to='trainings.Training')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkshopProperties',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('name', models.CharField(db_index=True, max_length=255, verbose_name='quiz name')),
                ('master', models.BooleanField(default=False)),
                ('trainer', models.BooleanField(default=False, verbose_name='live voting')),
                ('broadcastable', models.BooleanField(default=False, verbose_name='broadcastable')),
                ('hidden', models.BooleanField(default=False, verbose_name='hidden')),
                ('enable_point', models.BooleanField(default=False, verbose_name='with score')),
                ('order', models.PositiveIntegerField(db_index=True, blank=True, null=True)),
                ('first_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopproperties_by_first')),
                ('last_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopproperties_by_last')),
                ('mgroups', models.ManyToManyField(to='accounts.Group')),
                ('original', models.ForeignKey(blank=True, to='workshops.WorkshopProperties', null=True)),
                ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)),
                ('workshop', models.ForeignKey(to='workshops.Workshop')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='WorkshopQuestionAnswer',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('label', models.CharField(max_length=500, verbose_name='answer')),
                ('color', models.CharField(default='#823481', max_length=50, verbose_name='color', null=True, blank=True)),
                ('good', models.BooleanField(default=False, verbose_name='correct')),
                ('points', models.IntegerField(default=0)),
                ('order', models.PositiveIntegerField(db_index=True)),
                ('first_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopquestionanswer_by_first')),
                ('last_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopquestionanswer_by_last')),
                ('original', models.ForeignKey(blank=True, to='workshops.WorkshopQuestionAnswer', null=True)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='WorkshopQuestionUserAnswer',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('text', models.TextField()),
                ('answer', models.ForeignKey(to='workshops.WorkshopQuestionAnswer', null=True)),
                ('first_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopquestionuseranswer_by_first')),
                ('last_update', models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopquestionuseranswer_by_last')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkshopStep',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('order', models.PositiveIntegerField(db_index=True, blank=True, null=True)),
                ('type', models.CharField(db_index=True, max_length=255, editable=False)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='WorkshopImage',
            fields=[
                ('workshopstep_ptr', models.OneToOneField(parent_link=True, to='workshops.WorkshopStep', auto_created=True)),
                ('uid', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('img', models.ForeignKey(to='documents.DownloadableFile')),
            ],
            options={
                'abstract': False,
            },
            bases=('workshops.workshopstep',),
        ),
        migrations.CreateModel(
            name='WorkshopQuestion',
            fields=[
                ('workshopstep_ptr', models.OneToOneField(parent_link=True, to='workshops.WorkshopStep', auto_created=True)),
                ('uid', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('label', models.CharField(max_length=500)),
                ('description', models.CharField(max_length=500)),
            ],
            options={
                'abstract': False,
            },
            bases=('workshops.workshopstep',),
        ),
        migrations.CreateModel(
            name='WorkshopText',
            fields=[
                ('workshopstep_ptr', models.OneToOneField(parent_link=True, to='workshops.WorkshopStep', auto_created=True)),
                ('uid', django_extensions.db.fields.UUIDField(blank=True, serialize=False, primary_key=True, editable=False)),
                ('raw', models.TextField()),
                ('html', models.TextField()),
            ],
            options={
                'abstract': False,
            },
            bases=('workshops.workshopstep',),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='first_update',
            field=models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopstep_by_first'),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='last_update',
            field=models.ForeignKey(blank=True, to='sync.Update', null=True, related_name='workshopstep_by_last'),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='original',
            field=models.ForeignKey(blank=True, to='workshops.WorkshopStep', null=True),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='workshop',
            field=models.ForeignKey(to='workshops.Workshop'),
        ),
        migrations.AddField(
            model_name='workshopquestionuseranswer',
            name='question',
            field=models.ForeignKey(to='workshops.WorkshopQuestion'),
        ),
        migrations.AddField(
            model_name='workshopquestionanswer',
            name='question',
            field=models.ForeignKey(to='workshops.WorkshopQuestion'),
        ),
        migrations.AlterUniqueTogether(
            name='workshopproperties',
            unique_together=set([('user', 'workshop')]),
        ),
    ]
