# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-03-05 00:23
from __future__ import unicode_literals

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Ecocase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('promise', tinymce.models.HTMLField(default='')),
                ('description', tinymce.models.HTMLField(default='')),
                ('categories', models.ManyToManyField(to='ecocases.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Ecocase2ESM',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('weight', models.IntegerField(default=0)),
                ('ecocase', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecocases.Ecocase')),
            ],
        ),
        migrations.CreateModel(
            name='EcocaseComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=100, validators=[django.core.validators.MinLengthValidator(1)])),
                ('body', models.TextField()),
                ('date', models.DateTimeField(auto_now=True)),
                ('ecocase', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecocases.Ecocase')),
            ],
        ),
        migrations.CreateModel(
            name='EcocaseImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prefix', models.CharField(default='', max_length=200)),
                ('image', models.ImageField(default='ecocases/images/no-image.jpg', upload_to='ecocases/images/')),
                ('ecocase', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ecocases.Ecocase')),
            ],
        ),
        migrations.CreateModel(
            name='EcocaseRating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.PositiveIntegerField()),
                ('username', models.CharField(max_length=100, validators=[django.core.validators.MinLengthValidator(1)])),
                ('ecocase', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecocases.Ecocase')),
            ],
        ),
        migrations.CreateModel(
            name='ESM',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(default='', max_length=50)),
                ('title', models.CharField(default='', max_length=100)),
                ('description', models.CharField(default='', max_length=500)),
                ('logo_url', models.CharField(default='', max_length=500, null=True)),
                ('image_url', models.CharField(default='', max_length=500, null=True)),
                ('pdf_url', models.CharField(default='', max_length=500, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ESMEvaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', tinymce.models.HTMLField(default='')),
                ('is_first_esm', models.NullBooleanField(default=False)),
                ('is_second_esm', models.NullBooleanField(default=False)),
                ('ecocase2esm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecocases.Ecocase2ESM')),
            ],
        ),
        migrations.CreateModel(
            name='Level',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=500)),
                ('esm', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ecocases.ESM')),
            ],
        ),
        migrations.AddField(
            model_name='esmevaluation',
            name='question',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ecocases.Question'),
        ),
        migrations.AddField(
            model_name='esmevaluation',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='ecocase2esm',
            name='esm',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecocases.ESM'),
        ),
        migrations.AddField(
            model_name='ecocase',
            name='first_esm',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='first_esm', to='ecocases.ESM'),
        ),
        migrations.AddField(
            model_name='ecocase',
            name='levels',
            field=models.ManyToManyField(to='ecocases.Level'),
        ),
        migrations.AddField(
            model_name='ecocase',
            name='second_esm',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='second_esm', to='ecocases.ESM'),
        ),
        migrations.AddField(
            model_name='ecocase',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
