# Generated by Django 2.2.14 on 2020-10-28 07:23

from django.db import migrations, models
import django.db.models.deletion
import markdownx.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('lrex_study', '0001_initial'),
        ('lrex_materials', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(max_length=230, unique=True)),
                ('number', models.IntegerField(help_text='Number of the item.')),
                ('condition', models.CharField(help_text='Condition of the item (character limit: 16).', max_length=16)),
                ('block', models.IntegerField(default=1, help_text='Number of the questionnaire block in which the item will appear.')),
                ('materials', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='items', to='lrex_materials.Materials')),
            ],
            options={
                'ordering': ['number', 'condition'],
            },
        ),
        migrations.CreateModel(
            name='AudioLinkItem',
            fields=[
                ('item_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lrex_item.Item')),
                ('urls', models.TextField(help_text='Links to the audio files separated by commas (e.g., https://yourserver.org/item1a-i.ogg,https://yourserver.org/item1a-ii.ogg). ', max_length=5000, verbose_name='URLs')),
                ('description', markdownx.models.MarkdownxField(blank=True, help_text='Additional description presented with the audio item.', max_length=5000, null=True)),
            ],
            bases=('lrex_item.item',),
        ),
        migrations.CreateModel(
            name='MarkdownItem',
            fields=[
                ('item_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lrex_item.Item')),
                ('text', markdownx.models.MarkdownxField(help_text='Content of the item with markdown formatting (character limit: 1024).', max_length=1024)),
            ],
            bases=('lrex_item.item',),
        ),
        migrations.CreateModel(
            name='TextItem',
            fields=[
                ('item_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lrex_item.Item')),
                ('text', models.TextField(help_text='Content of the item (character limit: 1024).', max_length=1024)),
            ],
            bases=('lrex_item.item',),
        ),
        migrations.CreateModel(
            name='ItemQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(default=0)),
                ('question', models.CharField(help_text='Individual question text for this item (e.g. "How acceptable is this sentence?").', max_length=1000)),
                ('scale_labels', models.CharField(blank=True, help_text='Individual rating scale labels for this item, separated by commas (e.g. "1,2,3,4,5"). If a label contains a comma itself, escape it with "\\" (e.g. "A,B,Can\'t decide\\, I like both"). Note that this will only overwrite the displayed labels, but the responses will be saved according to the general scale specified in the study settings.', max_length=500, null=True)),
                ('legend', models.CharField(blank=True, help_text='Individual legend for this item to clarify the scale (e.g. "1 = bad, 5 = good")', max_length=1000, null=True)),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item_questions', to='lrex_item.Item')),
            ],
            options={
                'ordering': ['item', 'number'],
            },
        ),
        migrations.CreateModel(
            name='ItemList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(default=0)),
                ('items', models.ManyToManyField(to='lrex_item.Item')),
                ('materials', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='lists', to='lrex_materials.Materials')),
            ],
            options={
                'ordering': ['materials', 'number'],
            },
        ),
        migrations.CreateModel(
            name='ItemFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scale_values', models.CharField(help_text='Scale values, separated by commas (e.g. "1,3"). If a label contains a comma itself, escape it with "\\" (e.g. "A,B,Can\'t decide\\, I like both"). The feedback will be shown to the participant if one of these ratings is selected.', max_length=500)),
                ('feedback', models.TextField(help_text='Feedback shown to the participant for the selected rating scale values.', max_length=5000)),
                ('item', models.ForeignKey(help_text='Item for the feedback.', on_delete=django.db.models.deletion.CASCADE, related_name='item_feedback', to='lrex_item.Item')),
                ('question', models.ForeignKey(help_text='Question for the feedback.', on_delete=django.db.models.deletion.CASCADE, to='lrex_study.Question')),
            ],
            options={
                'ordering': ['item', 'question', 'pk'],
            },
        ),
    ]
